diff --git a/guestbook/php-redis/Dockerfile b/guestbook/php-redis/Dockerfile index 46207880d..e88a82cc0 100644 --- a/guestbook/php-redis/Dockerfile +++ b/guestbook/php-redis/Dockerfile @@ -14,6 +14,9 @@ FROM php:5-apache +COPY fixup-apt-list.sh / +RUN ["/fixup-apt-list.sh"] + RUN apt-get update RUN pear channel-discover pear.nrk.io RUN pear install nrk/Predis diff --git a/guestbook/php-redis/Makefile b/guestbook/php-redis/Makefile index 3353eb5c7..f7942a657 100644 --- a/guestbook/php-redis/Makefile +++ b/guestbook/php-redis/Makefile @@ -15,7 +15,7 @@ TAG = v6 REGISTRY = gcr.io/google-samples ARCH ?= $(shell go env GOARCH) -ALL_ARCH = amd64 arm arm64 ppc64le +ALL_ARCH = amd64 arm arm64 ppc64le s390x QEMUVERSION=v2.7.0 @@ -35,7 +35,10 @@ ifeq ($(ARCH),ppc64le) QEMUARCH=ppc64le BASEIMAGE=ppc64le/php:5-apache endif - +ifeq ($(ARCH),s390x) + QEMUARCH=s390x + BASEIMAGE=s390x/php:5-apache +endif TEMP_DIR := $(shell mktemp -d) all: all-container diff --git a/guestbook/php-redis/fixup-apt-list.sh b/guestbook/php-redis/fixup-apt-list.sh new file mode 100755 index 000000000..4eb76f9ab --- /dev/null +++ b/guestbook/php-redis/fixup-apt-list.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +DEB_ARCH=$(dpkg --print-architecture) + +# http://security.debian.org/debian-security/dists/jessie/updates/InRelease is missing +# entries for some platforms, so we just remove the last line in sources.list in +# /etc/apt/sources.list which is "deb http://deb.debian.org/debian jessie-updates main" + +case ${DEB_ARCH} in + arm64|ppc64el|s390x) + sed -i '/security/d' /etc/apt/sources.list + ;; +esac + +exit 0 diff --git a/guestbook/redis-slave/Makefile b/guestbook/redis-slave/Makefile index f1bddf975..7a07acc0a 100644 --- a/guestbook/redis-slave/Makefile +++ b/guestbook/redis-slave/Makefile @@ -15,7 +15,7 @@ TAG = v3 REGISTRY = gcr.io/google-samples ARCH ?= $(shell go env GOARCH) -ALL_ARCH = amd64 arm arm64 ppc64le +ALL_ARCH = amd64 arm arm64 ppc64le s390x IMAGE = $(REGISTRY)/gb-redisslave MULTI_ARCH_IMG = $(IMAGE)-$(ARCH) @@ -33,6 +33,10 @@ ifeq ($(ARCH),ppc64le) QEMUARCH=ppc64le BASEIMAGE=ppc64le/redis:3.2.9 endif +ifeq ($(ARCH),s390x) + QEMUARCH=s390x + BASEIMAGE=s390x/redis:3.2.9 +endif TEMP_DIR := $(shell mktemp -d)