Skip to content

Commit

Permalink
Merge pull request #94 from bartoszmajsak/docker_copy_go_modules
Browse files Browse the repository at this point in the history
fix(docker): splits COPY with go.mod first
  • Loading branch information
openshift-merge-robot authored Jun 29, 2023
2 parents 1825a32 + 85bc1c0 commit ad72352
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/odh-notebook-controller/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ FROM golang:${GOLANG_VERSION} as builder

WORKDIR /workspace

# Copy the Go Modules manifests
COPY notebook-controller /workspace/notebook-controller
COPY odh-notebook-controller /workspace/odh-notebook-controller
COPY odh-notebook-controller/go.* /workspace/odh-notebook-controller/

# 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 cd /workspace/odh-notebook-controller && go mod download

COPY notebook-controller /workspace/notebook-controller
COPY odh-notebook-controller /workspace/odh-notebook-controller

WORKDIR /workspace/odh-notebook-controller

# Build
Expand Down

0 comments on commit ad72352

Please sign in to comment.