Skip to content

Commit f6814e7

Browse files
authored
Merge pull request #2678 from camilamacedo86/fix-go-v2-kustomize
🐛 (go/v2) fix issue introduced by removing the GO111MODULE=on from Dockerfile
2 parents a31e4b0 + c9f63e8 commit f6814e7

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

pkg/plugins/golang/v2/scaffolds/internal/templates/dockerfile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ COPY api/ api/
5555
COPY controllers/ controllers/
5656
5757
# Build
58-
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go
58+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go
5959
6060
# Use distroless as minimal base image to package the manager binary
6161
# Refer to https://github.com/GoogleContainerTools/distroless for more details

testdata/project-v2-addon/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ COPY channels/ /channels/
1919
RUN chmod -R a+rx /channels/
2020

2121
# Build
22-
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go
22+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go
2323

2424
# Use distroless as minimal base image to package the manager binary
2525
# Refer to https://github.com/GoogleContainerTools/distroless for more details

testdata/project-v2-multigroup/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ COPY apis/ apis/
1515
COPY controllers/ controllers/
1616

1717
# Build
18-
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go
18+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go
1919

2020
# Use distroless as minimal base image to package the manager binary
2121
# Refer to https://github.com/GoogleContainerTools/distroless for more details

testdata/project-v2/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ COPY api/ api/
1515
COPY controllers/ controllers/
1616

1717
# Build
18-
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go
18+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go
1919

2020
# Use distroless as minimal base image to package the manager binary
2121
# Refer to https://github.com/GoogleContainerTools/distroless for more details

0 commit comments

Comments
 (0)