From c1325504c92c31adbac7242db817f7444a264308 Mon Sep 17 00:00:00 2001 From: Chris Davis Date: Wed, 3 Jul 2019 17:11:04 -0500 Subject: [PATCH] Updating makefile and php Dockerfiles to pin correct apline version for php 7.0 --- Makefile | 6 ++++-- images/php/cli-drupal/Dockerfile | 1 + images/php/cli/Dockerfile | 1 + images/php/fpm/Dockerfile | 3 ++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 38bf4cde69..15f5aab128 100644 --- a/Makefile +++ b/Makefile @@ -90,7 +90,7 @@ docker_build_python = docker build $(DOCKER_BUILD_PARAMS) --build-arg LAGOON_VER # 2. PHP version and type of image (ie 7.0-fpm, 7.0-cli etc) # 3. Location of Dockerfile # 4. Path of Docker Build Context -docker_build_php = docker build $(DOCKER_BUILD_PARAMS) --build-arg LAGOON_VERSION=$(LAGOON_VERSION) --build-arg IMAGE_REPO=$(CI_BUILD_TAG) --build-arg PHP_VERSION=$(1) -t $(CI_BUILD_TAG)/php:$(2) -f $(3) $(4) +docker_build_php = docker build $(DOCKER_BUILD_PARAMS) --build-arg LAGOON_VERSION=$(LAGOON_VERSION) --build-arg IMAGE_REPO=$(CI_BUILD_TAG) --build-arg PHP_VERSION=$(1) --build-arg PHP_IMAGE_VERSION=$(2) -t $(CI_BUILD_TAG)/php:$(3) -f $(4) $(5) docker_build_node = docker build $(DOCKER_BUILD_PARAMS) --build-arg LAGOON_VERSION=$(LAGOON_VERSION) --build-arg IMAGE_REPO=$(CI_BUILD_TAG) --build-arg NODE_VERSION=$(1) -t $(CI_BUILD_TAG)/node:$(2) -f $(3) $(4) @@ -255,8 +255,10 @@ $(build-phpimages): build/commons # if there is a subtype, add it. If not, just keep what we already had $(eval type_dash = $(if $(subtype),-$(type)-$(subtype),$(type_dash))) $(eval type_slash = $(if $(subtype),/$(type)-$(subtype),$(type_slash))) +# cover the edge case for php 7.0 needing php:7-fpm-alpine + $(eval php_ver = $(patsubst 7.0,7,$(version))) # Call the docker build - $(call docker_build_php,$(version),$(version)$(type_dash),images/php$(type_slash)/Dockerfile,images/php$(type_slash)) + $(call docker_build_php,$(version),$(php_ver),$(version)$(type_dash),images/php$(type_slash)/Dockerfile,images/php$(type_slash)) # Touch an empty file which make itself is using to understand when the image has been last build touch $@ diff --git a/images/php/cli-drupal/Dockerfile b/images/php/cli-drupal/Dockerfile index e4360a6b6f..1457440ae5 100644 --- a/images/php/cli-drupal/Dockerfile +++ b/images/php/cli-drupal/Dockerfile @@ -1,4 +1,5 @@ ARG PHP_VERSION +ARG PHP_IMAGE_VERSION ARG IMAGE_REPO FROM ${IMAGE_REPO:-lagoon}/php:${PHP_VERSION}-cli diff --git a/images/php/cli/Dockerfile b/images/php/cli/Dockerfile index 805a10f720..4ae7bca2b4 100644 --- a/images/php/cli/Dockerfile +++ b/images/php/cli/Dockerfile @@ -1,5 +1,6 @@ ARG PHP_VERSION ARG IMAGE_REPO +ARG PHP_IMAGE_VERSION FROM ${IMAGE_REPO:-lagoon}/php:${PHP_VERSION}-fpm LABEL maintainer="amazee.io" diff --git a/images/php/fpm/Dockerfile b/images/php/fpm/Dockerfile index dd35afc248..f1f96a23e4 100644 --- a/images/php/fpm/Dockerfile +++ b/images/php/fpm/Dockerfile @@ -1,7 +1,8 @@ ARG PHP_VERSION +ARG PHP_IMAGE_VERSION ARG IMAGE_REPO FROM ${IMAGE_REPO:-lagoon}/commons as commons -FROM php:${PHP_VERSION}-fpm-alpine +FROM php:${PHP_IMAGE_VERSION}-fpm-alpine LABEL maintainer="amazee.io" ENV LAGOON=php