Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating Makefile and php Dockerfiles to pin correct Apline version for php 7.0 #1136

Merged
merged 5 commits into from Jul 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions Makefile
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
@@ -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
@@ -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
7 changes: 3 additions & 4 deletions 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
Expand Down Expand Up @@ -36,9 +37,7 @@ COPY ssmtp.conf /etc/ssmtp/ssmtp.conf

ENV NEWRELIC_VERSION=8.6.0.238

RUN apk del --no-cache curl libcurl \
&& apk add --no-cache "curl=7.61.1-r2" "libcurl=7.61.1-r2" --repository http://dl-cdn.alpinelinux.org/alpine/v3.8/main/ \
&& apk add --no-cache fcgi \
RUN apk add --no-cache fcgi \
ssmtp \
libzip libzip-dev \
# for gd
Expand Down