Skip to content

Commit

Permalink
Added hack for using in Windows 10 Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Feb 6, 2019
1 parent 4e1eac4 commit 2295b90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions Dockerfile
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ ENV \
RUN apk update && \
echo "http://dl-cdn.alpinelinux.org/alpine/edge/community/" >> /etc/apk/repositories && \
apk add --update autossh && \
apk add --update openssh-client && \
rm -rf /var/lib/apt/lists/*
5 changes: 2 additions & 3 deletions entrypoint.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ fi
DEFAULT_PORT=$RANDOM
let "DEFAULT_PORT += 32768"
echo [INFO] Tunneling ${SSH_HOSTUSER:=root}@${SSH_HOSTNAME:=localhost}:${SSH_TUNNEL_REMOTE:=${DEFAULT_PORT}} to ${SSH_TUNNEL_HOST=localhost}:${SSH_TUNNEL_LOCAL:=22}

eval $(ssh-agent -s)
cat ${SSH_KEY_FILE} | ssh-add -k -
echo autossh \
-M 0 \
-N \
Expand All @@ -24,7 +25,6 @@ echo autossh \
-o ServerAliveCountMax=1 \
-o "ExitOnForwardFailure yes" \
-t -t \
-i ${SSH_KEY_FILE:=/id_rsa} \
${SSH_MODE:=-R} ${SSH_TUNNEL_REMOTE}:${SSH_TUNNEL_HOST}:${SSH_TUNNEL_LOCAL} \
-p ${SSH_HOSTPORT:=22} \
${SSH_HOSTUSER}@${SSH_HOSTNAME}
Expand All @@ -41,7 +41,6 @@ autossh \
-o ServerAliveCountMax=1 \
-o "ExitOnForwardFailure yes" \
-t -t \
-i ${SSH_KEY_FILE:=/id_rsa} \
${SSH_MODE:=-R} ${SSH_TUNNEL_REMOTE}:${SSH_TUNNEL_HOST}:${SSH_TUNNEL_LOCAL} \
-p ${SSH_HOSTPORT:=22} \
${SSH_HOSTUSER}@${SSH_HOSTNAME}

0 comments on commit 2295b90

Please sign in to comment.