mirror of
https://github.com/byReqz/ssh-chat-docker.git
synced 2024-12-04 15:31:50 +00:00
Allow key generation to suceed even if container doesn't have internet connectivity.
This commit is contained in:
parent
93c49c1625
commit
a3dc24aee2
@ -9,6 +9,7 @@ FROM debian:latest
|
|||||||
|
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
RUN chmod +x /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
|
COPY --from=0 /ssh-chat/ssh-chat /ssh-chat
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ if [ -f ssh_key ]; then
|
|||||||
/ssh-chat -i /ssh_key $@
|
/ssh-chat -i /ssh_key $@
|
||||||
else
|
else
|
||||||
echo "SSH Key not found at /ssh_key. Generating..."
|
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-keygen -t rsa -b 4096 -f /ssh_key -q -N ''
|
||||||
/ssh-chat -i /ssh_key $@
|
/ssh-chat -i /ssh_key $@
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user