From cb6794856afa0e00a3ad727e0b71e3b0b865a786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20R?= Date: Mon, 20 Aug 2018 09:31:42 +0200 Subject: [PATCH] [Docker + p.sh] Swith to PHP 7.2 & allow Dockerfiles to take version by env var (#319) --- .env | 4 ++-- .platform.app.yaml | 2 +- doc/docker/Dockerfile-app | 5 +++-- doc/docker/Dockerfile-nginx | 3 ++- doc/docker/base-prod.yml | 4 ++++ doc/docker/distribution.yml | 4 ++-- 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.env b/.env index b1159d4a9e..e311bfa148 100644 --- a/.env +++ b/.env @@ -10,8 +10,8 @@ DATABASE_PASSWORD=SetYourOwnPassword DATABASE_NAME=ezp ## Docker images (name and version) -PHP_IMAGE=ezsystems/php:7.1-v1 -PHP_IMAGE_DEV=ezsystems/php:7.1-v1-dev +PHP_IMAGE=ezsystems/php:7.2-v1 +PHP_IMAGE_DEV=ezsystems/php:7.2-v1-dev NGINX_IMAGE=nginx:stable MYSQL_IMAGE=healthcheck/mariadb SELENIUM_IMAGE=selenium/standalone-chrome-debug:3.4.0 diff --git a/.platform.app.yaml b/.platform.app.yaml index 10ce545803..e974969a0a 100644 --- a/.platform.app.yaml +++ b/.platform.app.yaml @@ -8,7 +8,7 @@ name: app # The type of the application to build. -type: php:7.1 +type: php:7.2 build: # "none" means we're running composer manually, see build hook flavor: "none" diff --git a/doc/docker/Dockerfile-app b/doc/docker/Dockerfile-app index 9bff30112e..fc9f195448 100644 --- a/doc/docker/Dockerfile-app +++ b/doc/docker/Dockerfile-app @@ -1,4 +1,5 @@ -FROM ezsystems/php:7.1-v1 as builder +ARG PHP_IMAGE=ezsystems/php:7.2-v1 +FROM ${PHP_IMAGE} as builder # This is prod image (for dev use just mount your application as host volume into php image we extend here) ENV SYMFONY_ENV=prod @@ -26,7 +27,7 @@ RUN rm -Rf app/logs/* app/cache/*/* RUN rm -rf web/css web/fonts web/js web/var -FROM ezsystems/php:7.1-v1 +FROM ${PHP_IMAGE} # This is prod image (for dev use just mount your application as host volume into php image we extend here) ENV SYMFONY_ENV=prod diff --git a/doc/docker/Dockerfile-nginx b/doc/docker/Dockerfile-nginx index 37e4c73f84..181fc10d13 100644 --- a/doc/docker/Dockerfile-nginx +++ b/doc/docker/Dockerfile-nginx @@ -1,4 +1,5 @@ -FROM ezsystems/php:7.1-v1 as web-build +ARG PHP_IMAGE=ezsystems/php:7.2-v1 +FROM ${PHP_IMAGE} as web-build ENV SYMFONY_ENV=prod diff --git a/doc/docker/base-prod.yml b/doc/docker/base-prod.yml index e6072179af..ef7ed460be 100644 --- a/doc/docker/base-prod.yml +++ b/doc/docker/base-prod.yml @@ -6,6 +6,8 @@ services: build: context: ../../ dockerfile: ${APP_DOCKER_FILE} + args: + - PHP_IMAGE depends_on: - db environment: @@ -28,6 +30,8 @@ services: build: context: ../../ dockerfile: doc/docker/Dockerfile-nginx + args: + - PHP_IMAGE depends_on: - app ports: diff --git a/doc/docker/distribution.yml b/doc/docker/distribution.yml index 7cb28fe4fb..5a2225372a 100644 --- a/doc/docker/distribution.yml +++ b/doc/docker/distribution.yml @@ -14,7 +14,7 @@ services: - backend app: - image: ezsystems/php:7.1-v1 + image: ${PHP_IMAGE} depends_on: - db - distribution @@ -39,7 +39,7 @@ services: - vardir:/var/www/web/var web: - image: nginx:stable + image: ${NGINX_IMAGE} depends_on: - distribution - app