From 94997031c25081fee48e6e85d4a9b7f4e339ad61 Mon Sep 17 00:00:00 2001 From: shanilhirani <48246737+shanilhirani@users.noreply.github.com> Date: Thu, 19 Sep 2024 12:15:52 +0100 Subject: [PATCH] build(dockerfile): update dockerfile to include certs package from alpine image (#19) --- CHANGELOG.md | 8 +++++++- Dockerfile | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 268a01b..c09beac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1,7 @@ -## Unreleased +## v0.1.0-alpha1 (2024-09-18) + +### Fix + +- **goreleaser**: support for arm64 and single binaries (#18) + +## v0.1.0-alpha (2024-09-17) diff --git a/Dockerfile b/Dockerfile index 0d92fec..33835c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,17 @@ +# Build stage: Use a base image with certificates to build the final image +FROM alpine:latest AS base + +# Copy the CA certificates from Alpine to a separate build stage +RUN apk --no-cache add ca-certificates + +# Final stage: Use scratch as the base image FROM scratch + +# Copy the compiled Go binary into the container COPY go-credly / + +# Copy the CA certificates from the previous build stage +COPY --from=base /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt + +# Set the binary as the entrypoint ENTRYPOINT ["/go-credly"]