Skip to content

Commit

Permalink
dockerfile: copy the api dir before go mod download
Browse files Browse the repository at this point in the history
The go mod download command fails on the github runner as it is not able
to find the go.mod file under api dir.

Signed-off-by: Raghavendra Talur <[email protected]>
  • Loading branch information
raghavendra-talur authored and BenamarMk committed Jan 23, 2024
1 parent 9d37967 commit f0694b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
COPY api/ api/
# 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 main.go main.go
COPY api/ api/
COPY controllers/ controllers/

# Build
Expand Down

0 comments on commit f0694b1

Please sign in to comment.