From c5e091e35095cef2ae088531e0c90855d1dcfe07 Mon Sep 17 00:00:00 2001 From: Ivan Krutov Date: Sun, 4 Apr 2021 19:53:33 +0300 Subject: [PATCH] More compact commands for applying certificate --- Dockerfile | 5 +---- entrypoint.sh | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index e6fde90ed..10dfdc34d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,10 +53,7 @@ RUN \ apt-get clean && \ rm -Rf /tmp/* && rm -Rf /var/lib/apt/lists/* && \ chmod 777 /etc/ssl/certs && \ - rm -Rf /usr/local/share/ca-certificates && \ - mkdir /tmp/ca-certificates && \ - chmod 777 /tmp/ca-certificates && \ - ln -s /tmp/ca-certificates /usr/local/share/ca-certificates + mkdir /tmp/ca-certificates COPY entrypoint.sh / diff --git a/entrypoint.sh b/entrypoint.sh index a90ae37b7..a3ac069f7 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -41,9 +41,9 @@ XSELD_PID=$! if env | grep -q ROOT_CA_; then for e in $(env | grep ROOT_CA_ | sed -e 's/=.*$//'); do certname=$(echo -n $e | sed -e 's/ROOT_CA_//') - echo ${!e} | base64 -d >/usr/local/share/ca-certificates/${certname}.pem + echo ${!e} | base64 -d >/usr/local/share/ca-certificates/${certname}.crt done - update-ca-certificates + update-ca-certificates --localcertsdir /tmp/ca-certificates fi /usr/bin/xvfb-run -l -n "$DISPLAY_NUM" -s "-ac -screen 0 $SCREEN_RESOLUTION -noreset -listen tcp" /usr/bin/fluxbox -display "$DISPLAY" >/dev/null 2>&1 &