Skip to content

Commit

Permalink
chore: update Dockerfile.dev-self-contained to allow better build cac…
Browse files Browse the repository at this point in the history
…he (#1755)
  • Loading branch information
jebabin committed Sep 18, 2023
1 parent d1f58c5 commit 9b28fbc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dockerfiles/Dockerfile.dev-self-contained
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ FROM golang:alpine as builder
# use version (for example "v0.3.3") or "main"
ARG WATCHTOWER_VERSION=main

# Pre download required modules to avoid redownloading at each build thanks to docker layer caching.
# Copying go.mod and go.sum ensure to invalid the layer/build cache if there is a change in module requirement
WORKDIR /watchtower
COPY go.mod .
COPY go.sum .
RUN go mod download

RUN apk add --no-cache \
alpine-sdk \
ca-certificates \
Expand Down

0 comments on commit 9b28fbc

Please sign in to comment.