From af4050f70caf7b9d4e5ccd27a499e2db56a22ee6 Mon Sep 17 00:00:00 2001 From: Jan Lauber Date: Thu, 26 Dec 2024 21:39:05 +0100 Subject: [PATCH] fix: Dockerfile with custom ca cert Signed-off-by: Jan Lauber --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index e853cfdf..5b342d5b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,9 +23,10 @@ RUN npm run build FROM alpine AS runtime WORKDIR /app/one-click -# Install ca-certificates package and create directory for custom certificates +# Install ca-certificates package and create directories RUN apk --no-cache add ca-certificates \ - && mkdir -p /usr/local/share/ca-certificates + && mkdir -p /usr/local/share/ca-certificates \ + && mkdir -p /tmp/certs # Copy application files COPY --from=backend-builder /build/one-click /app/one-click/one-click @@ -37,7 +38,8 @@ COPY < /usr/local/share/ca-certificates/custom-ca.crt + echo "\${CUSTOM_CA_CERT}" > /tmp/certs/custom-ca.crt + cp /tmp/certs/custom-ca.crt /usr/local/share/ca-certificates/ update-ca-certificates fi