Skip to content

Commit

Permalink
Docker: cache modules when Makefile is updated
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Oct 17, 2022
1 parent 05c76ce commit af5e2cd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 . .
Expand Down

0 comments on commit af5e2cd

Please sign in to comment.