Skip to content

Commit f59baed

Browse files
authored
Merge pull request #4680 from nojnhuh/docker-build
remove redundant steps in docker build
2 parents 8fcb9a2 + 7279cad commit f59baed

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

Dockerfile

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,9 @@ WORKDIR /workspace
2525
ARG goproxy=https://proxy.golang.org
2626
ENV GOPROXY=$goproxy
2727

28-
# Copy the Go Modules manifests
29-
COPY go.mod go.mod
30-
COPY go.sum go.sum
31-
32-
# Cache deps before building and copying source so that we don't need to re-download as much
33-
# and so that source changes don't invalidate our downloaded layer
34-
RUN --mount=type=cache,target=/go/pkg/mod \
35-
go mod download
36-
3728
# Copy the sources
3829
COPY ./ ./
3930

40-
# Cache the go build into the the Go’s compiler cache folder so we take benefits of compiler caching across docker build calls
41-
RUN --mount=type=cache,target=/root/.cache/go-build \
42-
--mount=type=cache,target=/go/pkg/mod \
43-
go build .
44-
4531
# Build
4632
ARG package=.
4733
ARG ARCH

0 commit comments

Comments
 (0)