From 8b4feb558f1b23651fed2d0b9ce9e29efa57cf4a Mon Sep 17 00:00:00 2001 From: Guidolin Marco Date: Wed, 12 Aug 2020 11:50:47 +0200 Subject: [PATCH] FIX: workspace container build failure when no custom SSL certificates were provided --- docker/workspace/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docker/workspace/Dockerfile b/docker/workspace/Dockerfile index 5b4a5f4..f85eb37 100755 --- a/docker/workspace/Dockerfile +++ b/docker/workspace/Dockerfile @@ -191,7 +191,11 @@ RUN usermod -u 1000 www-data \ COPY ssl-certificates /etc/ssl/certificates/ COPY ssh-keys/ /root/.ssh/ -RUN chmod -R 644 /etc/ssl/certificates/* + +RUN if [ $(ls -1 /etc/ssl/certificates/*.crt 2>/dev/null | wc -l) != 0 ]; then \ + chmod -R 644 /etc/ssl/certificates/* \ +;fi + RUN if [ $(ls -1 /root/.ssh/id_rsa* 2>/dev/null | wc -l) != 0 ]; then \ chmod 600 /root/.ssh/id_rsa \ && chmod 644 /root/.ssh/id_rsa.pub \