From 1159aeb4fd3037c411f6a31290031ac85823414e Mon Sep 17 00:00:00 2001 From: Nemo Date: Tue, 13 Aug 2019 10:29:25 +0530 Subject: [PATCH] Adds openssh-client --- Dockerfile | 2 +- entrypoint.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3aaf633..36d4483 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ COPY . /outliner/ RUN gem install bundler && \ bundle install && \ - apk add --no-cache git && \ + apk add --no-cache git openssh-client && \ echo -e "StrictHostKeyChecking no" >> /etc/ssh/ssh_config && \ mkdir /root/.ssh diff --git a/entrypoint.sh b/entrypoint.sh index 1fd8e4e..20324ea 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -6,13 +6,13 @@ if [ $# -eq 0 ]; then fi setup_git() { - chmod 0400 /root/.ssh/id_rsa + chmod 0400 "$HOME/.ssh/id_rsa" - if [ -f "$HOME.ssh/id_rsa" ]; then + if [ -f "$HOME/.ssh/id_rsa" ]; then chmod 600 "$HOME.ssh/id_rsa" - if [ ! -d "$HOME.ssh/id_rsa.pub" ]; then - ssh-keygen -y -f "$HOME.ssh/id_rsa" > "$HOME.ssh/id_rsa.pub" + if [ ! -d "$HOME/.ssh/id_rsa.pub" ]; then + ssh-keygen -y -f "$HOME/.ssh/id_rsa" > "$HOME/.ssh/id_rsa.pub" fi echo "[+] Using SSH key for git pushes"