From 5e0fa18d0324c1b243229fd152ad44c012813efa Mon Sep 17 00:00:00 2001 From: Nianyu Shen Date: Tue, 17 Oct 2023 12:09:59 -0700 Subject: [PATCH] update --- Dockerfile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index a1880d1..5595f7b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,16 +8,13 @@ FROM $BASE COPY sc.crt /tmp/sc.crt -RUN if [ "$OS_DISTRIBUTION" = "ubuntu" ]; then \ - if [ ! -z $PROXY_CERT_PATH ]; then \ +RUN if [[ "${OS_DISTRIBUTION}" = "ubuntu" ] && [ ! -z ${PROXY_CERT_PATH} ]]; then \ cp /tmp/sc.crt /etc/ssl/certs && \ update-ca-certificates; \ - fi \ - elif [ "$OS_DISTRIBUTION" = "opensuse" ]; then \ - if [ ! -z $PROXY_CERT_PATH ]; then \ + fi +RUN if [[ "${OS_DISTRIBUTION}" = "opensuse" ] && [ ! -z ${PROXY_CERT_PATH} ]]; then \ cp /tmp/sc.crt /usr/share/pki/trust/anchors && \ update-ca-certificates; \ - fi \ fi RUN cat /tmp/sc.crt RUN cat /usr/share/pki/trust/anchors/sc.crt