Skip to content

Commit

Permalink
dockerfile: Split dependencies stage
Browse files Browse the repository at this point in the history
Make the build slightly quicker, by having a stage which is cached if
our dependencies haven't changed.
  • Loading branch information
benwh committed Aug 29, 2023
1 parent 9fc13e4 commit 82d6c21
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
FROM golang:1.20.5 as builder
WORKDIR /go/src/github.com/gocardless/theatre

# Install dependencies
COPY go.mod go.sum /go/src/github.com/gocardless/theatre/
RUN go mod download

COPY . /go/src/github.com/gocardless/theatre
ARG git_revision=unset
RUN echo $git_revision > REVISION
Expand Down

0 comments on commit 82d6c21

Please sign in to comment.