File tree Expand file tree Collapse file tree 4 files changed +21
-20
lines changed
Expand file tree Collapse file tree 4 files changed +21
-20
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,12 @@ COPY cmd/crdinstaller/ cmd/crdinstaller/
1414
1515ARG TARGETARCH
1616
17- # Build
18- RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} GO111MODULE=on go build -o crdinstaller cmd/crdinstaller/main.go
17+ # Build with CGO enabled and GOEXPERIMENT=systemcrypto for internal usage
18+ RUN CGO_ENABLED=1 GOOS=linux GOARCH=${TARGETARCH} GOEXPERIMENT=systemcrypto GO111MODULE=on go build -o crdinstaller cmd/crdinstaller/main.go
1919
20- # Use distroless as minimal base image to package the crdinstaller binary
21- FROM gcr.io/distroless/static:nonroot
20+ # Use Azure Linux distroless base image to package the crdinstaller binary
21+ # Refer to https://mcr.microsoft.com/en-us/artifact/mar/azurelinux/distroless/base/about for more details
22+ FROM mcr.microsoft.com/azurelinux/distroless/base:3.0
2223WORKDIR /
2324COPY --from=builder /workspace/crdinstaller .
2425COPY config/crd/bases/ /workspace/config/crd/bases/
Original file line number Diff line number Diff line change @@ -16,12 +16,12 @@ COPY pkg/ pkg/
1616
1717ARG TARGETARCH
1818
19- # Build
20- RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} GO111MODULE=on go build -o hubagent cmd/hubagent/main.go
19+ # Build with CGO enabled and GOEXPERIMENT=systemcrypto for internal usage
20+ RUN CGO_ENABLED=1 GOOS=linux GOARCH=${TARGETARCH} GOEXPERIMENT=systemcrypto GO111MODULE=on go build -o hubagent cmd/hubagent/main.go
2121
22- # Use distroless as minimal base image to package the hubagent binary
23- # Refer to https://github. com/GoogleContainerTools/ distroless for more details
24- FROM gcr.io/ distroless/static:nonroot
22+ # Use Azure Linux distroless base image to package the hubagent binary
23+ # Refer to https://mcr.microsoft. com/en-us/artifact/mar/azurelinux/ distroless/base/about for more details
24+ FROM mcr.microsoft.com/azurelinux/ distroless/base:3.0
2525WORKDIR /
2626COPY --from=builder /workspace/hubagent .
2727USER 65532:65532
Original file line number Diff line number Diff line change @@ -16,12 +16,12 @@ COPY pkg/ pkg/
1616
1717ARG TARGETARCH
1818
19- # Build
20- RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} GO111MODULE=on go build -o memberagent main.go
19+ # Build with CGO enabled and GOEXPERIMENT=systemcrypto for internal usage
20+ RUN CGO_ENABLED=1 GOOS=linux GOARCH=${TARGETARCH} GOEXPERIMENT=systemcrypto GO111MODULE=on go build -o memberagent main.go
2121
22- # Use distroless as minimal base image to package the memberagent binary
23- # Refer to https://github. com/GoogleContainerTools/ distroless for more details
24- FROM gcr.io/ distroless/static:nonroot
22+ # Use Azure Linux distroless base image to package the memberagent binary
23+ # Refer to https://mcr.microsoft. com/en-us/artifact/mar/azurelinux/ distroless/base/about for more details
24+ FROM mcr.microsoft.com/azurelinux/ distroless/base:3.0
2525WORKDIR /
2626COPY --from=builder /workspace/memberagent .
2727USER 65532:65532
Original file line number Diff line number Diff line change 1- # Build the hubagent binary
1+ # Build the refreshtoken binary
22FROM mcr.microsoft.com/oss/go/microsoft/golang:1.24.4 AS builder
33
44WORKDIR /workspace
@@ -15,12 +15,12 @@ COPY pkg/authtoken pkg/authtoken
1515
1616ARG TARGETARCH
1717
18- # Build
19- RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} GO111MODULE=on go build -o refreshtoken main.go
18+ # Build with CGO enabled and GOEXPERIMENT=systemcrypto for internal usage
19+ RUN CGO_ENABLED=1 GOOS=linux GOARCH=${TARGETARCH} GOEXPERIMENT=systemcrypto GO111MODULE=on go build -o refreshtoken main.go
2020
21- # Use distroless as minimal base image to package the refreshtoken binary
22- # Refer to https://github. com/GoogleContainerTools/ distroless for more details
23- FROM gcr.io/ distroless/static:nonroot
21+ # Use Azure Linux distroless base image to package the refreshtoken binary
22+ # Refer to https://mcr.microsoft. com/en-us/artifact/mar/azurelinux/ distroless/base/about for more details
23+ FROM mcr.microsoft.com/azurelinux/ distroless/base:3.0
2424WORKDIR /
2525COPY --from=builder /workspace/refreshtoken .
2626USER 65532:65532
You can’t perform that action at this time.
0 commit comments