Skip to content

Commit

Permalink
Reduce Docker Image Size
Browse files Browse the repository at this point in the history
  • Loading branch information
philnielsen committed Mar 16, 2021
1 parent 0f8bd27 commit c558c10
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.16.2
FROM golang:1.16.2 AS builder

RUN mkdir -p /trisongulate
WORKDIR /trisongulate
Expand All @@ -7,4 +7,9 @@ ADD . .
RUN go mod download
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build

FROM ubuntu:latest

ENTRYPOINT [ "/trisongulate/trisongulate" ]
WORKDIR /root/
COPY --from=builder /trisongulate/trisongulate .
CMD ["./trisongulate"]

0 comments on commit c558c10

Please sign in to comment.