Skip to content

Commit 3e1bc17

Browse files
committed
Create extra layer for caching go dependencies
Fresher version of #129
1 parent f94b256 commit 3e1bc17

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Dockerfile

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ FROM golang:1.21-alpine AS builder
33
RUN apk --no-cache add gcc musl-dev
44

55
WORKDIR ${GOPATH}/src/github.com/mcuadros/ofelia
6-
COPY . ${GOPATH}/src/github.com/mcuadros/ofelia
6+
7+
COPY go.mod go.sum ${GOPATH}/src/github.com/mcuadros/ofelia/
8+
RUN go mod download
9+
10+
COPY . ${GOPATH}/src/github.com/mcuadros/ofelia/
711

812
RUN go build -o /go/bin/ofelia .
913

0 commit comments

Comments
 (0)