Last active
June 1, 2020 12:48
-
-
Save duskohu/ca7e5adc4d0af66d478de41766f04b6f to your computer and use it in GitHub Desktop.
Dockerfiles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:7.1-fpm-alpine | |
LABEL maintainer="Dusan Hudak <[email protected]>" | |
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ --allow-untrusted gnu-libiconv | |
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php | |
# install GD | |
RUN apk add --no-cache freetype libpng libjpeg-turbo freetype-dev libpng-dev libjpeg-turbo-dev && \ | |
docker-php-ext-configure gd \ | |
--with-gd \ | |
--with-freetype-dir=/usr/include/ \ | |
--with-png-dir=/usr/include/ \ | |
--with-jpeg-dir=/usr/include/ && \ | |
NPROC=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) && \ | |
docker-php-ext-install -j${NPROC} gd && \ | |
apk del --no-cache freetype-dev libpng-dev libjpeg-turbo-dev | |
# other | |
RUN docker-php-ext-install \ | |
mysqli \ | |
pdo \ | |
pdo_mysql | |
RUN echo http://dl-2.alpinelinux.org/alpine/edge/community/ >> /etc/apk/repositories | |
RUN apk --no-cache add shadow && usermod -u 1000 www-data | |
RUN apk add --no-cache git composer && \ | |
rm -rf /tmp/* /usr/local/lib/php/doc/* /var/cache/apk/* | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nginx:stable-alpine | |
LABEL maintainer="Dusan Hudak <[email protected]>" | |
RUN echo http://dl-2.alpinelinux.org/alpine/edge/community/ >> /etc/apk/repositories | |
RUN apk --no-cache add shadow && usermod -u 1000 nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment