Skip to content

Commit

Permalink
Merge pull request #2 from nxtlytics/docker-image
Browse files Browse the repository at this point in the history
Multi-stage docker build
  • Loading branch information
missingcharacter authored May 26, 2020
2 parents d70d9a8 + 7eb06b7 commit 3662803
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:alpine
FROM golang:1.14.3-alpine3.11 as builder

# Prevent linking against libc
ENV CGO_ENABLED 0
Expand All @@ -9,5 +9,9 @@ WORKDIR /go/src/github.com/nxtlytics/ec2metaproxy
ADD . /go/src/github.com/nxtlytics/ec2metaproxy
RUN go get github.com/nxtlytics/ec2metaproxy/cmd/ec2metaproxy

FROM alpine:3.11.6

COPY --from=builder /go/bin/ec2metaproxy /go/bin/ec2metaproxy

CMD []
ENTRYPOINT ["/go/bin/ec2metaproxy"]

0 comments on commit 3662803

Please sign in to comment.