multi stage dockerfile

pull/5/head
Karolis Rusenas 2017-06-14 18:09:24 +01:00
parent 359ff0ef33
commit 98f35fef02
1 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,12 @@
FROM golang:1.8.1-alpine
COPY . /go/src/github.com/rusenask/keel
WORKDIR /go/src/github.com/rusenask/keel
RUN apk add --no-cache git && go get
RUN CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags -'w' -o keel .
FROM alpine:latest
RUN apk --no-cache add ca-certificates
COPY keel /bin/keel
COPY --from=0 /go/src/github.com/rusenask/keel/keel /bin/keel
ENTRYPOINT ["/bin/keel"]
EXPOSE 9300