Skip to content

Commit a5e9963

Browse files
committed
Improve cached dependency fetching in Dockerfile
Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
1 parent 6072b7d commit a5e9963

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ WORKDIR /go/src/github.com/webdevops/kube-bootstrap-token-manager
55
# Get deps (cached)
66
COPY ./go.mod /go/src/github.com/webdevops/kube-bootstrap-token-manager
77
COPY ./go.sum /go/src/github.com/webdevops/kube-bootstrap-token-manager
8-
RUN go mod download
8+
COPY ./Makefile /go/src/github.com/webdevops/kube-pool-manager
9+
RUN make dependencies
910

1011
# Compile
1112
COPY ./ /go/src/github.com/webdevops/kube-bootstrap-token-manager

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ lint: $(GOLANGCI_LINT_BIN)
3636
$(GOLANGCI_LINT_BIN) run -D megacheck -E unused,gosimple,staticcheck --timeout=10m
3737

3838
dependencies: $(GOLANGCI_LINT_BIN)
39+
go mod download
3940

4041
$(GOLANGCI_LINT_BIN):
4142
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(FIRST_GOPATH)/bin v1.23.8

0 commit comments

Comments
 (0)