Skip to content

Commit ab21f45

Browse files
authored
[local builds] move instructions to copy code before go mod commands (#510)
Signed-off-by: Amine Hilaly <[email protected]>
1 parent 71c40be commit ab21f45

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Dockerfile.local

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ COPY $service_alias-controller/ATTRIBUTION.md $work_dir/ATTRIBUTION.md
3232
# Copy the go.mod and go.sum files for the service controller
3333
COPY $service_alias-controller/go.mod $work_dir/go.mod
3434
COPY $service_alias-controller/go.sum $work_dir/go.sum
35+
# Copy the controller code
36+
COPY $service_alias-controller/apis $work_dir/apis
37+
COPY $service_alias-controller/cmd $work_dir/cmd
38+
COPY $service_alias-controller/pkg $work_dir/pkg
3539

3640
# Copy local runtime code to the container
3741
COPY runtime/pkg $work_dir/../runtime/pkg
@@ -52,10 +56,6 @@ RUN go mod download
5256
WORKDIR $work_dir
5357
RUN go mod download
5458

55-
# Now copy the go source code for the service controller...
56-
COPY $service_alias-controller/apis $work_dir/apis
57-
COPY $service_alias-controller/cmd $work_dir/cmd
58-
COPY $service_alias-controller/pkg $work_dir/pkg
5959
# Build
6060
RUN GIT_VERSION=$service_controller_git_version && \
6161
GIT_COMMIT=$service_controller_git_commit && \

0 commit comments

Comments
 (0)