Skip to content

Commit

Permalink
Switch Docker Image to official php base image
Browse files Browse the repository at this point in the history
Switches away 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; gliderlabs/docker-alpine#255
  • Loading branch information
captn3m0 committed May 26, 2019
1 parent 16bd2ae commit 7000d7f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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/

0 comments on commit 7000d7f

Please sign in to comment.