Docker: cache modules when Makefile is updated
This commit is contained in:
parent
05c76ceaad
commit
af5e2cdfa6
1 changed files with 5 additions and 3 deletions
|
|
@ -32,13 +32,15 @@ ARG RELEASE=0
|
|||
|
||||
WORKDIR /build
|
||||
|
||||
# install go tools and cache modules
|
||||
COPY Makefile .
|
||||
# download modules
|
||||
COPY go.mod .
|
||||
COPY go.sum .
|
||||
RUN go mod download
|
||||
|
||||
# install tools
|
||||
COPY Makefile .
|
||||
COPY tools.go .
|
||||
RUN make install
|
||||
RUN go mod download
|
||||
|
||||
# prepare
|
||||
COPY . .
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue