From b3d137ab26bc25c54bb8c49d898bc8aa443922ac Mon Sep 17 00:00:00 2001 From: Guidolin Marco Date: Tue, 21 Apr 2020 23:13:13 +0200 Subject: [PATCH] FIX: personal ssh keys loading silently failed --- docker/docs/extras.md | 4 ++-- docker/workspace/Dockerfile | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docker/docs/extras.md b/docker/docs/extras.md index 6024788..8c52739 100644 --- a/docker/docs/extras.md +++ b/docker/docs/extras.md @@ -7,8 +7,8 @@ of them will be loaded when the environment starts. - If you have to add one or more Supervisor programs, create one or more `.conf` files in `docker/workspace/supervisor-programs` folder. Each of them will be loaded when the environment starts. -- If you want to load your ssh key into the workspace container, copy them into the `docker/workspace/ssh-keys` folder -and they will be loaded by the environment. +- If you want to load your ssh key into the workspace container, copy the `id_rsa` and `id_rsa.pub` into the +`docker/workspace/ssh-keys` folder: they will be loaded by the environment once it is built. - If you want to load your ssl certificates to access your project through HTTPS, copy your `crt` file as `server.crt` and your `.key` file as `server.key` into the `docker/workspace/ssl-certificates` folder and they will be loaded by the diff --git a/docker/workspace/Dockerfile b/docker/workspace/Dockerfile index 6f68baf..c41798f 100755 --- a/docker/workspace/Dockerfile +++ b/docker/workspace/Dockerfile @@ -194,10 +194,10 @@ COPY ssh-keys /root/.ssh/host-keys/ RUN chmod 644 /etc/ssl/certificates/* RUN if [find "/root/.ssh/host-keys" -mindepth 1 -print -quit 2>/dev/null | grep -q .]; then \ - chmod 600 /root/.ssh/host-keys/* \ - && chmod 644 /root/.ssh/host-keys/*.pub \ + chmod 600 /root/.ssh/host-keys/id_rsa \ + && chmod 644 /root/.ssh/host-keys/id_rsa.pub \ && eval `ssh-agent -s` \ - && ssh-add /root/.ssh/host-keys/* \ + && ssh-add /root/.ssh/host-keys/id_rsa \ ;fi ######################