From 2580d275ba37b0df3def2bf764ae44e0211aa755 Mon Sep 17 00:00:00 2001 From: Julien Cabillot Date: Wed, 1 Nov 2017 18:41:29 +0100 Subject: [PATCH 1/6] pin version from, todo user --- Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2a112e9..d3bc055 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,9 @@ -FROM php:apache +FROM "php:7.1-apache" -USER www-data +USER "www-data" RUN curl -L "https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz" | tar -zx --strip=1 -USER root +# TODO: utiliser un utilisateur www-data +USER "root" -HEALTHCHECK --interval=10s \ - CMD curl --fail "http://localhost" || exit 1 \ No newline at end of file +HEALTHCHECK --interval="10s" \ + CMD curl --fail "http://localhost" || exit 1 From f0415517924dc9d63d4cde1218bed4686d4f9ae2 Mon Sep 17 00:00:00 2001 From: Julien Cabillot Date: Wed, 1 Nov 2017 18:57:41 +0100 Subject: [PATCH 2/6] on ne tourne plus en root --- Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index d3bc055..bfb21c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,13 @@ FROM "php:7.1-apache" +RUN sed -i'' 's/^Listen 80$/Listen 8080/' "/etc/apache2/ports.conf" && \ + sed -i'' 's/^$//' '/etc/apache2/sites-enabled/000-default.conf' && \ + rm -rf "/usr/share/doc/*" \ + "/var/cache/*" \ + "/var/lib/apt/lists/*" + USER "www-data" RUN curl -L "https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz" | tar -zx --strip=1 -# TODO: utiliser un utilisateur www-data -USER "root" HEALTHCHECK --interval="10s" \ - CMD curl --fail "http://localhost" || exit 1 + CMD curl --fail "http://localhost:8080" || exit 1 From f84de5ca62fc6e6a9b05b48034172b452a81817c Mon Sep 17 00:00:00 2001 From: Julien Cabillot Date: Fri, 3 Nov 2017 08:43:28 +0100 Subject: [PATCH 3/6] =?UTF-8?q?m=C3=A9nage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index bfb21c1..d25afc7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,14 @@ FROM "php:7.1-apache" RUN sed -i'' 's/^Listen 80$/Listen 8080/' "/etc/apache2/ports.conf" && \ sed -i'' 's/^$//' '/etc/apache2/sites-enabled/000-default.conf' && \ rm -rf "/usr/share/doc/*" \ - "/var/cache/*" \ - "/var/lib/apt/lists/*" + "/var/cache/*" \ + "/var/lib/apt/lists/*" \ + "/usr/src/*" \ + "/var/cache/*" \ + "/var/log/"{apt/*,dpkg.log} \ + "/var/www/html" && \ + mkdir "/var/www/html" && \ + chown "www-data":"www-data" "/var/www/html" USER "www-data" RUN curl -L "https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz" | tar -zx --strip=1 From 5e40b4e0da9588767596848ff1e3aa173493a2bb Mon Sep 17 00:00:00 2001 From: Julien Cabillot Date: Fri, 3 Nov 2017 08:50:43 +0100 Subject: [PATCH 4/6] =?UTF-8?q?m=C3=A9nage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d25afc7..dbe0255 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,8 @@ RUN sed -i'' 's/^Listen 80$/Listen 8080/' "/etc/apache2/ports.conf" && \ "/usr/src/*" \ "/var/cache/*" \ "/var/log/"{apt/*,dpkg.log} \ - "/var/www/html" && \ + "/var/www/html" \ + "/tmp/*" && \ mkdir "/var/www/html" && \ chown "www-data":"www-data" "/var/www/html" From 98cca06a9202818b26ed768419b68e3aa6aa6bad Mon Sep 17 00:00:00 2001 From: Julien Cabillot Date: Mon, 6 Nov 2017 11:00:24 +0100 Subject: [PATCH 5/6] ajout tiny pour l'init --- Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index dbe0255..8127930 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,8 +13,16 @@ RUN sed -i'' 's/^Listen 80$/Listen 8080/' "/etc/apache2/ports.conf" && \ mkdir "/var/www/html" && \ chown "www-data":"www-data" "/var/www/html" +# 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" RUN curl -L "https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz" | tar -zx --strip=1 +CMD [ "docker-php-entrypoint", "apache2-foreground" ] + HEALTHCHECK --interval="10s" \ CMD curl --fail "http://localhost:8080" || exit 1 From af6a3f29066e584bb3cd79dc02e0fefaef33c627 Mon Sep 17 00:00:00 2001 From: Julien Cabillot Date: Mon, 6 Nov 2017 19:49:01 +0100 Subject: [PATCH 6/6] =?UTF-8?q?passage=20=C3=A0=20www/phpapache?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 31 ++++--------------------------- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8127930..5b453f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,28 +1,5 @@ -FROM "php:7.1-apache" +ARG VERSION="latest" +FROM "registry.cabillot.eu/www/phpapache:${VERSION}" +MAINTAINER "Julien Cabillot " -RUN sed -i'' 's/^Listen 80$/Listen 8080/' "/etc/apache2/ports.conf" && \ - sed -i'' 's/^$//' '/etc/apache2/sites-enabled/000-default.conf' && \ - rm -rf "/usr/share/doc/*" \ - "/var/cache/*" \ - "/var/lib/apt/lists/*" \ - "/usr/src/*" \ - "/var/cache/*" \ - "/var/log/"{apt/*,dpkg.log} \ - "/var/www/html" \ - "/tmp/*" && \ - mkdir "/var/www/html" && \ - chown "www-data":"www-data" "/var/www/html" - -# 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" -RUN curl -L "https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz" | tar -zx --strip=1 - -CMD [ "docker-php-entrypoint", "apache2-foreground" ] - -HEALTHCHECK --interval="10s" \ - CMD curl --fail "http://localhost:8080" || exit 1 +RUN curl -s -S -L "https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz" | tar -zx --strip=1