From a3dc24aee2b0b69cf37f49e3f9e41693a957430a Mon Sep 17 00:00:00 2001 From: Marco Slater Date: Sat, 11 May 2019 19:48:07 +0100 Subject: [PATCH] Allow key generation to suceed even if container doesn't have internet connectivity. --- Dockerfile | 1 + entrypoint.sh | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 45fa45e..6998520 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,7 @@ FROM debian:latest COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh +RUN apt-get update && apt-get install openssh-client -y && apt-get clean COPY --from=0 /ssh-chat/ssh-chat /ssh-chat diff --git a/entrypoint.sh b/entrypoint.sh index 41354e5..26d8aa4 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -4,7 +4,6 @@ if [ -f ssh_key ]; then /ssh-chat -i /ssh_key $@ else echo "SSH Key not found at /ssh_key. Generating..." - apt-get update > /dev/null && apt-get install openssh-client -y > /dev/null 2>&1 ssh-keygen -t rsa -b 4096 -f /ssh_key -q -N '' /ssh-chat -i /ssh_key $@ fi