mirror of
https://github.com/henrygd/beszel.git
synced 2026-09-21 08:57:48 +02:00
fix(agent): include root CA certificates in base image (#2291)
This commit is contained in:
@@ -8,6 +8,8 @@ RUN go mod download
|
||||
# Copy source files
|
||||
COPY . ./
|
||||
|
||||
RUN apk add --no-cache ca-certificates && update-ca-certificates
|
||||
|
||||
# Build
|
||||
ARG TARGETOS TARGETARCH
|
||||
RUN CGO_ENABLED=0 GOGC=75 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags "-w -s" -o /agent ./internal/cmd/agent
|
||||
@@ -19,6 +21,7 @@ RUN rm -rf /tmp/*
|
||||
# --------------------------
|
||||
FROM scratch
|
||||
COPY --from=builder /agent /agent
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
|
||||
# this is so we don't need to create the /tmp directory in the scratch container
|
||||
COPY --from=builder /tmp /tmp
|
||||
|
||||
Reference in New Issue
Block a user