From aa5b3baaaa74c63c965472d88d6f1488c61b54ce Mon Sep 17 00:00:00 2001 From: guirish Date: Wed, 14 Feb 2018 01:32:51 -0500 Subject: [PATCH] Added support for s390x (cherry picked from commit 5f1130a54b75aab137ccdb0cf8224da3548dba83) --- Makefile | 5 +++++ docker-image/Dockerfile-s390x | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 docker-image/Dockerfile-s390x diff --git a/Makefile b/Makefile index e46486b3..41de214f 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,11 @@ ifeq ($(ARCH),ppc64le) GO_BUILD_VER?=latest endif +ifeq ($(ARCH),s390x) + ARCHTAG:=-s390x + GO_BUILD_VER?=latest +endif + help: @echo "Typha Makefile" @echo diff --git a/docker-image/Dockerfile-s390x b/docker-image/Dockerfile-s390x new file mode 100644 index 00000000..7e831f61 --- /dev/null +++ b/docker-image/Dockerfile-s390x @@ -0,0 +1,18 @@ +FROM s390x/alpine:3.6 +MAINTAINER LoZ Open Source Ecosystem (https://www.ibm.com/developerworks/community/groups/community/lozopensource) + +# Since our binary isn't designed to run as PID 1, run it via the tini init daemon. +RUN apk add --update tini +ENTRYPOINT ["/sbin/tini", "--"] + +ADD typha.cfg /etc/calico/typha.cfg + +# Put out binary in /code rather than directly in /usr/bin. This allows the downstream builds +# to more easily extract the build artefacts from the container. +RUN mkdir /code +ADD bin/calico-typha-s390x /code +WORKDIR /code +RUN ln -s /code/calico-typha-s390x /usr/bin/calico-typha + +# Run Typha by default +CMD ["calico-typha"]