Skip to content

Commit

Permalink
Updating makefile and php Dockerfiles to pin correct apline version f…
Browse files Browse the repository at this point in the history
…or php 7.0
  • Loading branch information
cdchris12 committed Jul 3, 2019
1 parent 3f4f23d commit c132550
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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 $@

Expand Down
1 change: 1 addition & 0 deletions images/php/cli-drupal/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ARG PHP_VERSION
ARG PHP_IMAGE_VERSION
ARG IMAGE_REPO
FROM ${IMAGE_REPO:-lagoon}/php:${PHP_VERSION}-cli

Expand Down
1 change: 1 addition & 0 deletions images/php/cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
3 changes: 2 additions & 1 deletion images/php/fpm/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit c132550

Please sign in to comment.