Skip to content

Commit

Permalink
Merge pull request #1 from linki/hchenxa_master
Browse files Browse the repository at this point in the history
Cross-compile powerpc binary
  • Loading branch information
hchenxa authored May 10, 2018
2 parents 0c69b94 + 11cb956 commit 0e82403
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Dockerfile.ppc64le
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
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
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 <linki+docker.com@posteo.de>

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"]

0 comments on commit 0e82403

Please sign in to comment.