From e5241112f3b369a243970c0e39ef559a4ab25b97 Mon Sep 17 00:00:00 2001 From: Torin Sandall Date: Thu, 21 May 2020 09:07:26 -0400 Subject: [PATCH] build: Fix image to include ca-certificates from distroless The scratch base image does not contain ca-certificates which meant that the version check was failing because of TLS errors while connecting to telemetry.openpolicyagent.org. Signed-off-by: Torin Sandall --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 301b0b44f2..1752e93964 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,8 @@ ARG BASE +FROM gcr.io/distroless/base as certs + FROM ${BASE} # Any non-zero number will do, and unfortunately a named user will not, as k8s @@ -13,6 +15,7 @@ FROM ${BASE} ARG USER=0 MAINTAINER Torin Sandall +COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt COPY opa_linux_amd64 /opa USER ${USER} ENTRYPOINT ["/opa"]