Merge pull request #221 from fkautz/pr_out_cache_go_modules_during_docker_build
cache go modules during docker build
This commit is contained in:
commit
f3182aa12f
@ -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