Configure dockers GD with support with multiple file formats.

Should fix issue #122 and #115
This commit is contained in:
Jan Böhmer 2022-07-21 22:53:59 +02:00
parent 8f2b145b21
commit d3d92d6013
2 changed files with 10 additions and 5 deletions

View file

@ -2,11 +2,16 @@ FROM php:8.1-apache
# Install needed dependencies for PHP build
RUN apt-get update && apt-get install -y pkg-config curl libcurl4-openssl-dev libicu-dev \
libpng-dev libjpeg-dev libfreetype6-dev gnupg zip libzip-dev libonig-dev libxslt-dev vim \
libpng-dev libjpeg-dev libfreetype6-dev gnupg zip libzip-dev libjpeg62-turbo-dev libonig-dev libxslt-dev libwebp-dev vim \
&& apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/*
# Install GD (we have to configure GD first before installing it, see issue #115)
RUN docker-php-ext-configure gd --with-freetype --with-jpeg && docker-php-ext-install gd
# Install GD with support for multiple formats
RUN docker-php-ext-configure gd \
--with-webp \
--with-jpeg \
--with-freetype \
&& docker-php-ext-install gd
# Install other needed PHP extensions
RUN docker-php-ext-install pdo_mysql curl intl mbstring bcmath gd zip xml xsl

View file

@ -11,7 +11,7 @@ services:
- ./public_media:/var/www/html/public/media
- ./db:/var/www/html/var/db
restart: unless-stopped
image: jbtronics/part-db1:master
image: jbtronics/part-db1:latest
environment:
# Put SQLite database in our mapped folder. You can configure some other kind of database here too.
- DATABASE_URL=sqlite:///%kernel.project_dir%/var/db/app.db