forked from linki/chaoskube
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from linki/hchenxa_master
Cross-compile powerpc binary
- Loading branch information
Showing
1 changed file
with
4 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |