Skip to content

Commit

Permalink
fix certs
Browse files Browse the repository at this point in the history
  • Loading branch information
identw committed Jun 1, 2024
1 parent d920ba4 commit 166c709
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.22 AS build
FROM --platform=$BUILDPLATFORM docker.io/golang:1.22 AS build

WORKDIR /app

Expand All @@ -20,7 +20,12 @@ RUN echo "Building BUILDPLATFORM: '${BUILDPLATFORM}', TARGETPLATFORM: '$TARGETPL
echo "Building for $GOOS/$GOARCH/$GOARM"; \
go build -ldflags="-s -w" -o ./custom-exporter .

FROM --platform=$BUILDPLATFORM docker.io/alpine:3.20.0 AS certificates

RUN apk add --no-cache ca-certificates


FROM scratch
COPY --from=certificates /etc/ssl /etc/ssl
COPY --from=build /app/custom-exporter /custom-exporter
ENTRYPOINT ["/custom-exporter"]
ENTRYPOINT ["/custom-exporter"]

0 comments on commit 166c709

Please sign in to comment.