cache go modules during docker build
Signed-off-by: Frederick F. Kautz IV <fkautz@alumni.cmu.edu>
This commit is contained in:
parent
c5089d5c04
commit
04fd20ed7e
@ -3,6 +3,7 @@
|
||||
FROM golang:1.16.2-alpine AS build
|
||||
WORKDIR /src
|
||||
RUN apk add --no-cache file
|
||||
ENV GOMODCACHE /root/.cache/gocache
|
||||
RUN --mount=target=. --mount=target=/root/.cache,type=cache \
|
||||
CGO_ENABLED=0 go build -o /out/dagger ./cmd/dagger && file /out/dagger | grep "statically linked"
|
||||
|
||||
|
Reference in New Issue
Block a user