Skip to content

Commit

Permalink
Add certificates to container
Browse files Browse the repository at this point in the history
  • Loading branch information
demophoon committed Dec 14, 2024
1 parent dc0d8f6 commit a5ce48d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
FROM golang:alpine AS base
RUN apk update && apk add ca-certificates && update-ca-certificates 2>/dev/null || true
RUN mkdir /new_tmp

FROM nixos/nix:2.24.9 AS builder

RUN nix-channel --add "https://github.com/NixOS/nixpkgs/archive/63dacb46bf939521bdc93981b4cbb7ecb58427a0.tar.gz" nixpkgs && nix-env --install direnv
Expand All @@ -7,11 +11,10 @@ WORKDIR /build
RUN direnv allow /build && \
direnv exec /build make dist

RUN mkdir /new_tmp

# Final Artifact
FROM scratch
COPY --from=builder /new_tmp /tmp
COPY --from=base /new_tmp /tmp
COPY --from=base /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /build/shrls /shrls
WORKDIR /config

Expand Down

0 comments on commit a5ce48d

Please sign in to comment.