mirror of
https://github.com/henrygd/beszel.git
synced 2026-09-18 14:04:20 +00: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
|
||||
@@ -29,4 +32,4 @@ COPY --from=builder /app/agent/test-data/amdgpu.ids /usr/share/libdrm/amdgpu.ids
|
||||
# Ensure data persistence across container recreations
|
||||
VOLUME ["/var/lib/beszel-agent"]
|
||||
|
||||
ENTRYPOINT ["/agent"]
|
||||
ENTRYPOINT ["/agent"]
|
||||
|
||||
Reference in New Issue
Block a user