From a4f44f952ad2c2aa5a7cbab9b9b9ba6490d66fab Mon Sep 17 00:00:00 2001 From: Birkhoff Lee Date: Thu, 9 Jan 2020 00:51:53 +0800 Subject: [PATCH] Dockerfile: Switch to php:7.2-fpm-alpine (#1713) It's usually a better practice to use an official supported Docker image (in this case, php) so it's best optimized and supported. --- Dockerfile | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 22c151b35..54ea1d760 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,19 @@ -FROM alpine:3.8 +FROM php:7.2-fpm-alpine WORKDIR /app -RUN apk add --no-cache --update ca-certificates certbot nginx dcron curl tini php7 php7-bcmath php7-common php7-dom php7-fpm php7-gd php7-mbstring php7-openssl php7-zip php7-pdo php7-phar php7-json php7-pdo_mysql php7-session php7-ctype php7-tokenizer php7-zlib php7-simplexml php7-fileinfo supervisor \ - && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +RUN apk add --no-cache --update ca-certificates dcron curl git supervisor tar unzip; \ + docker-php-ext-install bcmath; \ + apk add --no-cache libpng-dev; \ + docker-php-ext-install gd; \ + docker-php-ext-install mbstring; \ + docker-php-ext-install pdo; \ + docker-php-ext-install pdo_mysql; \ + docker-php-ext-install tokenizer; \ + apk add --no-cache libxml2-dev; \ + docker-php-ext-install xml; \ + docker-php-ext-install zip; \ + curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer COPY . ./ @@ -23,4 +33,4 @@ EXPOSE 80 443 ENTRYPOINT ["/bin/ash", ".dev/docker/entrypoint.sh"] -CMD [ "supervisord", "-n", "-c", "/etc/supervisord.conf" ] \ No newline at end of file +CMD [ "supervisord", "-n", "-c", "/etc/supervisord.conf" ]