Remove '-a' flag from build command to enable caching

'-a' flag forces recompilation of all packages, even if nothing changed, completely bypasses Go’s internal build cache.
This commit is contained in:
Volodymyr Zotov
2025-07-10 16:33:12 -05:00
parent a5416f4532
commit 285066139f

View File

@@ -27,7 +27,7 @@ RUN CGO_ENABLED=0 \
GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} \
go build \
-ldflags "-X \"github.com/1Password/onepassword-operator/version.Version=$operator_version\"" \
-a -o manager cmd/main.go
-o manager cmd/main.go
# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details