Speed up docker build by caching go mod downloads
This commit is contained in:
parent
bea8321c4e
commit
6ba2acb631
@ -1,5 +1,7 @@
|
|||||||
FROM golang:1.20 as builder
|
FROM golang:1.20 as builder
|
||||||
WORKDIR /app/
|
WORKDIR /app/
|
||||||
|
COPY go.mod go.sum /app/
|
||||||
|
RUN go mod download
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user