Skip to content

Instantly share code, notes, and snippets.

@beshkenadze
Created April 8, 2019 17:58
Show Gist options
  • Save beshkenadze/4a0b2aa0d8dd121483523bb66c8992f2 to your computer and use it in GitHub Desktop.
Save beshkenadze/4a0b2aa0d8dd121483523bb66c8992f2 to your computer and use it in GitHub Desktop.
PHP7 with gd (jpeg enabled)
FROM php:fpm-alpine
RUN apk update \
&& apk upgrade \
&& apk add --no-cache \
freetype \
libpng \
libjpeg-turbo \
freetype-dev \
libpng-dev \
jpeg-dev \
libjpeg \
libjpeg-turbo-dev
RUN docker-php-ext-configure gd \
--with-freetype-dir=/usr/lib/ \
--with-png-dir=/usr/lib/ \
--with-jpeg-dir=/usr/lib/ \
--with-gd
RUN NUMPROC=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) \
&& docker-php-ext-install -j${NUMPROC} gd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment