From 5997a3ef896011713b7416228e2a67c0e3bc5db7 Mon Sep 17 00:00:00 2001 From: Kyle Dodson Date: Thu, 19 Oct 2023 16:50:50 -0700 Subject: [PATCH] Add CA certificates to Docker image --- docker/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index bdac9ff..fcb551d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -FROM golang:1.21.3-alpine3.18 AS builder +FROM golang:1.21.3-alpine3.18 AS build WORKDIR /app COPY go.mod go.sum ./ @@ -12,8 +12,10 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /app/bin/virtual-kubelet . FROM scratch AS final +COPY --from=build /etc/ssl/certs /etc/ssl/certs +COPY --from=build /etc/ssl/cert.pem /etc/ssl/cert.pem COPY LICENSE /LICENSE COPY NOTICE /NOTICE -COPY --from=builder --chown=root:root /app/bin/virtual-kubelet /usr/bin/virtual-kubelet +COPY --from=build --chown=root:root /app/bin/virtual-kubelet /usr/bin/virtual-kubelet ENTRYPOINT ["/usr/bin/virtual-kubelet"]