Skip to content

Commit

Permalink
Optimize Dockerfile
Browse files Browse the repository at this point in the history
Dockerfile had a step for caching dependencies (go mod download). However, this is already done by the vendor directory, which we include. Therefore, this step can be removed to make the image build time faster.
  • Loading branch information
edif2008 committed Jan 25, 2024
1 parent 3672701 commit 7aabe2a
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download

# Copy the go source
COPY cmd/main.go cmd/main.go
Expand Down

0 comments on commit 7aabe2a

Please sign in to comment.