Skip to content

Commit

Permalink
operator: Use mod readonly when building container (#6843)
Browse files Browse the repository at this point in the history
  • Loading branch information
periklis committed Aug 5, 2022
1 parent 19c7315 commit d1365c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion operator/Dockerfile
Expand Up @@ -16,7 +16,7 @@ COPY controllers/ controllers/
COPY internal/ internal/

# Build
RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -a -o manager main.go
RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -mod=readonly -a -o manager main.go

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

0 comments on commit d1365c1

Please sign in to comment.