Skip to content

Commit 63a09b6

Browse files
author
liudali
committed
add s390x support for image gb-frontend and gb-redisslave in gcr.io/google-samples
1 parent c4cfecb commit 63a09b6

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

guestbook/php-redis/Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
FROM php:5-apache
1616

17+
COPY fixup-apt-list.sh /
18+
RUN ["/fixup-apt-list.sh"]
19+
1720
RUN apt-get update
1821
RUN pear channel-discover pear.nrk.io
1922
RUN pear install nrk/Predis

guestbook/php-redis/Makefile

+5-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
TAG = v6
1616
REGISTRY = gcr.io/google-samples
1717
ARCH ?= $(shell go env GOARCH)
18-
ALL_ARCH = amd64 arm arm64 ppc64le
18+
ALL_ARCH = amd64 arm arm64 ppc64le s390x
1919

2020
QEMUVERSION=v2.7.0
2121

@@ -35,7 +35,10 @@ ifeq ($(ARCH),ppc64le)
3535
QEMUARCH=ppc64le
3636
BASEIMAGE=ppc64le/php:5-apache
3737
endif
38-
38+
ifeq ($(ARCH),s390x)
39+
QEMUARCH=s390x
40+
BASEIMAGE=s390x/php:5-apache
41+
endif
3942
TEMP_DIR := $(shell mktemp -d)
4043

4144
all: all-container

guestbook/php-redis/fixup-apt-list.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
3+
DEB_ARCH=$(dpkg --print-architecture)
4+
5+
# http://security.debian.org/debian-security/dists/jessie/updates/InRelease is missing
6+
# entries for some platforms, so we just remove the last line in sources.list in
7+
# /etc/apt/sources.list which is "deb http://deb.debian.org/debian jessie-updates main"
8+
9+
case ${DEB_ARCH} in
10+
arm64|ppc64el|s390x)
11+
sed -i '/security/d' /etc/apt/sources.list
12+
;;
13+
esac
14+
15+
exit 0

guestbook/redis-slave/Makefile

+5-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
TAG = v3
1616
REGISTRY = gcr.io/google-samples
1717
ARCH ?= $(shell go env GOARCH)
18-
ALL_ARCH = amd64 arm arm64 ppc64le
18+
ALL_ARCH = amd64 arm arm64 ppc64le s390x
1919

2020
IMAGE = $(REGISTRY)/gb-redisslave
2121
MULTI_ARCH_IMG = $(IMAGE)-$(ARCH)
@@ -33,6 +33,10 @@ ifeq ($(ARCH),ppc64le)
3333
QEMUARCH=ppc64le
3434
BASEIMAGE=ppc64le/redis:3.2.9
3535
endif
36+
ifeq ($(ARCH),s390x)
37+
QEMUARCH=s390x
38+
BASEIMAGE=s390x/redis:3.2.9
39+
endif
3640

3741
TEMP_DIR := $(shell mktemp -d)
3842

0 commit comments

Comments
 (0)