Docker: cache modules when Makefile is updated

This commit is contained in:
andig 2022-10-17 20:00:43 +02:00
parent 05c76ceaad
commit af5e2cdfa6

View file

@ -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 . .