Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Cross-compile powerpc binary #1

Merged
merged 1 commit into from
May 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]