From 11cb956672bdea2192b035c4688c551c29c3e314 Mon Sep 17 00:00:00 2001 From: Martin Linkhorst Date: Wed, 18 Apr 2018 16:25:44 +0200 Subject: [PATCH] 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"]