Skip to content

Commit

Permalink
install CA certificates to fix certificate signed by unknown authority
Browse files Browse the repository at this point in the history
Signed-off-by: Qingchuan Hao <[email protected]>
  • Loading branch information
mainred committed Jul 31, 2024
1 parent ded54f3 commit bd8452e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22 AS builder

ARG VERSION
ARG APP_INSIGHTS_ID
RUN apt-get update && apt-get install -y ca-certificates
RUN update-ca-certificates

WORKDIR /workspace
COPY . .
Expand All @@ -17,13 +19,14 @@ RUN make manifests
RUN --mount=type=cache,target="/root/.cache/go-build" \
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \
-ldflags "-X main.version="$VERSION" \
-X "main.applicationInsightsID"="$APP_INSIGHTS_ID"" \
-X "main.applicationInsightsID"="$APP_INSIGHTS_ID"" \
-a -o retina-operator operator/main.go

##################### controller #######################
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/mirror/gcr/distroless/cc-debian11:latest@sha256:b53fbf5f81f4a120a489fedff2092e6fcbeacf7863fce3e45d99cc58dc230ccc as controller

WORKDIR /
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /workspace/retina-operator .
USER 65532:65532

Expand Down

0 comments on commit bd8452e

Please sign in to comment.