From 0c69b942b41c77f8ca78fad0f1f5cd942761ec8f Mon Sep 17 00:00:00 2001 From: Hui Chen Date: Fri, 26 Jan 2018 10:59:13 +0800 Subject: [PATCH 1/2] add ppc64le docker file --- Dockerfile.ppc64le | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Dockerfile.ppc64le diff --git a/Dockerfile.ppc64le b/Dockerfile.ppc64le new file mode 100644 index 00000000..5d239d7f --- /dev/null +++ b/Dockerfile.ppc64le @@ -0,0 +1,20 @@ +FROM ppc64le/golang:1.9-alpine as builder + +RUN apk --no-cache add git +RUN go get github.com/golang/dep/cmd/dep +WORKDIR /go/src/github.com/linki/chaoskube +COPY . . +RUN dep ensure +RUN go test -v ./... +RUN go build -o /bin/chaoskube -v \ + -ldflags "-X main.version=$(git describe --tags --always --dirty) -w -s" + +# final image +FROM ppc64le/alpine:3.6 +MAINTAINER Linki + +RUN apk --no-cache add dumb-init && addgroup -S chaoskube && adduser -S -g chaoskube chaoskube +COPY --from=builder /bin/chaoskube /bin/chaoskube + +USER chaoskube +ENTRYPOINT ["dumb-init", "--", "/bin/chaoskube"] From 11cb956672bdea2192b035c4688c551c29c3e314 Mon Sep 17 00:00:00 2001 From: Martin Linkhorst Date: Wed, 18 Apr 2018 16:25:44 +0200 Subject: [PATCH 2/2] chore: cross-compile powerpc binary --- Dockerfile.ppc64le | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile.ppc64le b/Dockerfile.ppc64le index 5d239d7f..34b0ca62 100644 --- a/Dockerfile.ppc64le +++ b/Dockerfile.ppc64le @@ -1,4 +1,5 @@ -FROM ppc64le/golang:1.9-alpine as builder +# builder image +FROM golang:1.9-alpine as builder RUN apk --no-cache add git RUN go get github.com/golang/dep/cmd/dep @@ -6,15 +7,13 @@ WORKDIR /go/src/github.com/linki/chaoskube COPY . . RUN dep ensure RUN go test -v ./... -RUN go build -o /bin/chaoskube -v \ +RUN GOARCH=ppc64le go build -o /bin/chaoskube -v \ -ldflags "-X main.version=$(git describe --tags --always --dirty) -w -s" # final image FROM ppc64le/alpine:3.6 MAINTAINER Linki -RUN apk --no-cache add dumb-init && addgroup -S chaoskube && adduser -S -g chaoskube chaoskube COPY --from=builder /bin/chaoskube /bin/chaoskube -USER chaoskube -ENTRYPOINT ["dumb-init", "--", "/bin/chaoskube"] +ENTRYPOINT ["/bin/chaoskube"]