Skip to content

Commit

Permalink
chore(ci): dockerfile - use multistage docker build for smaller image…
Browse files Browse the repository at this point in the history
… size
  • Loading branch information
heronimus committed Aug 16, 2023
1 parent 42558b9 commit 9608ee0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cardinal/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20
FROM golang:1.20 AS builder

WORKDIR /usr/src/app

Expand All @@ -7,6 +7,9 @@ copy vendor vendor/

RUN go build -v -o /usr/local/bin/app

FROM ubuntu:22.04
COPY --from=builder /usr/local/bin/app /usr/local/bin/

CMD ["app"]


0 comments on commit 9608ee0

Please sign in to comment.