File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -38,19 +38,13 @@ RUN --mount=type=cache,target=/go/pkg/mod \
38
38
# Copy the sources
39
39
COPY ./ ./
40
40
41
- # Cache the go build into the the Go’s compiler cache folder so we take benefits of compiler caching across docker build calls
42
- RUN --mount=type=cache,target=/root/.cache/go-build \
43
- --mount=type=cache,target=/go/pkg/mod \
44
- go build cmd/main.go
45
-
46
41
# Build
47
42
ARG path=cmd/main.go
48
43
ARG ARCH
49
44
ARG ldflags
50
45
51
- # Do not force rebuild of up-to-date packages (do not use -a) and use the compiler cache folder
52
- RUN --mount=type=cache,target=/root/.cache/go-build \
53
- --mount=type=cache,target=/go/pkg/mod \
46
+ # Do not force rebuild of up-to-date packages (do not use -a)
47
+ RUN --mount=type=cache,target=/go/pkg/mod \
54
48
CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} \
55
49
go build -ldflags "${ldflags} -extldflags '-static'" \
56
50
-o manager ${path}
You can’t perform that action at this time.
0 commit comments