Following images are integrated with OpenSSH server / client for remote development. They are built with UID=1000 and GID=1000 to create the non-root user.
python-ssh(Docker Hub): Python image integrated with SSH.pytorch-tzdata-git-ssh(Docker Hub): PyTorch integrated with SSH, tzdata and git.
(Deprecated Images)
python-ssh-node(Docker Hub): Python + Node integrated with SSH.pytorch-tzdata-ssh(Docker Hub): PyTorch integrated with SSH and tzdata.
You can run the container with the following command, where SALTED_PASSWD is the salted password for the SSH user:
docker run --name my_ssh_container -e SALTED_PASSWD=my_salted_password -d atomie/python-ssh:3.10But usually you want to mount the host's directory and need to make the user ID and group ID consistent between the host and the container to avoid permission issues. You can run the container with environment variables USER_ID and GROUP_ID:
docker run -d \
--name my_ssh_container \
-e SALTED_PASSWD=my_salted_password \
-e USER_ID=$(id -u) \
-e GROUP_ID=$(id -g) \
-v /path/to/host/dir:/path/to/container/dir \
atomie/python-ssh:3.10Note
You can use gen_salted_passwd.sh to generate the salted password file interactively.
The encrypted password is generated with salt:
CLEAR_PASSWD="clear_text_password"
SALTED_PASSWD=$(printf $CLEAR_PASSWD | openssl passwd -6 -salt KdN5Re3X2X18 -stdin)
echo $SALTED_PASSWD > salted_passwdAs an alternative to passing the salted password as an environment variable, you can use Docker secrets to store the salted password in a file and mount it to the container.
docker secret create salted_passwd salted_passwdThen you can run the container by specifying the secret file path to the environment variable SALTED_PASSWD_FILE:
docker run -d \
--name my_ssh_container \
--secret salted_passwd \
-e SALTED_PASSWD_FILE=/run/secrets/salted_passwd \
atomie/python-ssh:3.10Scripts in scripts directory:
start_docker.sh: script for (re)starting a container with SSH-integration.start_super_docker.sh: script for further sharing the host's docker socket and binary with the container.gen_salted_passwd.sh: interactive script for generating the salted password to a file.