Browse Source

passage à www/phpapache

master
root 3 years ago
parent
commit
b4349a166e
1 changed files with 12 additions and 26 deletions
  1. 38
      Dockerfile

38
Dockerfile

@ -1,44 +1,30 @@
FROM "php:7.1-apache"
ARG VERSION="latest"
FROM "registry.cabillot.eu/www/phpapache:${VERSION}"
MAINTAINER "Julien Cabillot <dockerimages@cabillot.eu>"
# TODO: pouvoir spécifier le UID/GID pour accéder au download
COPY "./" "/var/www/mydl.cabillot.eu/"
WORKDIR "/var/www/mydl.cabillot.eu"
RUN sed -i'' 's/^Listen 80$/Listen 8080/' "/etc/apache2/ports.conf" && \
sed -i'' 's/^<VirtualHost \*:80>$/<VirtualHost *:8080>/' '/etc/apache2/sites-enabled/000-default.conf' && \
apt-get update >/dev/null && \
RUN apt-get update && \
apt-get -y install libssl-dev git unzip && \
pecl install mongodb && \
docker-php-ext-enable mongodb && \
apt-get -y autoremove --purge && \
groupadd -g "1007" "nginx" && \
usermod -a -G "nginx" "www-data" && \
ln -s "/var/www/mydl.cabillot.eu/root" "/var/www/html" && \
curl "https://getcomposer.org/composer.phar" -o "composer.phar" && \
php "composer.phar" install && \
a2enmod rewrite && \
apt-get -y autoremove --purge libssl-dev git unzip && \
apt-get -y clean all && \
rm -rf "/usr/share/doc/*" \
"/var/cache/*" \
"/var/lib/apt/lists/*" \
#TODO: à mettre partout ailleurs
"/usr/src/*" \
"/var/cache/*" \
"/var/log/"{apt/*,dpkg.log} \
"/var/www/html" \
"/tmp/*" && \
groupadd -g "1007" "nginx" && \
usermod -a -G "nginx" "www-data" && \
ln -s "/var/www/mydl.cabillot.eu/root" "/var/www/html" && \
curl "https://getcomposer.org/composer.phar" -o "composer.phar" && \
php "composer.phar" install && \
a2enmod rewrite
# Add Tini
ENV "TINI_VERSION" "v0.16.1"
ADD "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini" "/tini"
RUN chmod +x "/tini"
ENTRYPOINT ["/tini", "--"]
USER "www-data"
CMD [ "docker-php-entrypoint", "apache2-foreground" ]
HEALTHCHECK --interval="10s" \
CMD curl --fail "http://localhost:8080" || exit 1
"/tmp/*"
# TODO : ajouter les HEADER HTTPS sécurisés dans le .htaccess
Loading…
Cancel
Save