[Docker] Switch Docker Image to official php base image (#1140)

* Switch Docker Image to official php base image

Switch from the unofficial Alpine+php image to the official php-apache image.
This has 2 advantages:

1. Official image is guaranteed to have regular updates, etc
2. The persistent Docker Alpine DNS Issue goes away;
https://github.com/gliderlabs/docker-alpine/issues/255

* [Docker] Ignore more files from Docker Image
This commit is contained in:
Nemo 2019-06-01 14:55:01 +05:30 committed by LogMANOriginal
parent 4a60f05fd6
commit 72bcc173eb
2 changed files with 18 additions and 5 deletions

View file

@ -1,7 +1,14 @@
.git .git
.gitattributes
.github/*
.travis.yml
cache/* cache/*
CONTRIBUTING.md
DEBUG DEBUG
Dockerfile Dockerfile
whitelist.txt phpcompatibility.xml
phpcs.xml phpcs.xml
CONTRIBUTING.md phpcs.xml
scalingo.json
tests/*
whitelist.txt

View file

@ -1,5 +1,11 @@
FROM ulsmith/alpine-apache-php7 FROM php:7-apache
COPY ./ /app/public/ ENV APACHE_DOCUMENT_ROOT=/app
RUN chown -R apache:root /app/public RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
&& apt-get --yes update && apt-get --yes install libxml2-dev \
&& docker-php-ext-install -j$(nproc) simplexml \
&& sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \
&& sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
COPY --chown=www-data:www-data ./ /app/