add s390x support for image gb-frontend and gb-redisslave in gcr.io/google-samples

This commit is contained in:
liudali 2019-05-13 17:21:07 +08:00
parent c4cfecbbe1
commit 63a09b6e91
4 changed files with 28 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)