Skip to content

Commit 3662803

Browse files
Merge pull request #2 from nxtlytics/docker-image
Multi-stage docker build
2 parents d70d9a8 + 7eb06b7 commit 3662803

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:alpine
1+
FROM golang:1.14.3-alpine3.11 as builder
22

33
# Prevent linking against libc
44
ENV CGO_ENABLED 0
@@ -9,5 +9,9 @@ WORKDIR /go/src/github.com/nxtlytics/ec2metaproxy
99
ADD . /go/src/github.com/nxtlytics/ec2metaproxy
1010
RUN go get github.com/nxtlytics/ec2metaproxy/cmd/ec2metaproxy
1111

12+
FROM alpine:3.11.6
13+
14+
COPY --from=builder /go/bin/ec2metaproxy /go/bin/ec2metaproxy
15+
1216
CMD []
1317
ENTRYPOINT ["/go/bin/ec2metaproxy"]

0 commit comments

Comments
 (0)