-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix build process to work with Dockerhub
- Loading branch information
Showing
3 changed files
with
18 additions
and
24 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,11 +1,14 @@ | ||
FROM alpine | ||
|
||
WORKDIR /root | ||
|
||
RUN apk update && apk add ca-certificates openssl && update-ca-certificates | ||
|
||
# download release of ecs-gen | ||
ENV ECS_GEN_RELEASE 0.3.2 | ||
RUN wget https://github.com/codesuki/ecs-gen/releases/download/$ECS_GEN_RELEASE/ecs-gen-linux-amd64.zip && unzip ecs-gen-linux-amd64.zip && cp ecs-gen-linux-amd64 /usr/local/bin/ecs-gen | ||
|
||
FROM golang:1.7.3-alpine AS builder | ||
RUN apk update && apk add --no-cache git make | ||
WORKDIR /go/src/github.com/codesuki/ecs-gen | ||
COPY glide.lock glide.yaml Makefile /go/src/github.com/codesuki/ecs-gen/ | ||
# to statically link | ||
ENV CGO_ENABLED 0 | ||
RUN go get -u github.com/Masterminds/glide && make deps | ||
COPY . . | ||
RUN make build | ||
|
||
FROM alpine:3.8 | ||
RUN apk update && apk add --no-cache ca-certificates openssl && update-ca-certificates | ||
COPY --from=builder /go/src/github.com/codesuki/ecs-gen/build/ecs-gen-linux-amd64 /usr/bin/ecs-gen | ||
CMD ["ecs-gen"] |
This file was deleted.
Oops, something went wrong.
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