Example of a dockerfile with sshd and jupyter notebook.
- Clone
git clone [email protected]:lune-sta/docker-sshd-jupyter.git
cd docker-sshd-jupyter
- Add your public key
$ vim authorized_keys
# or
$ cat ~/.ssh/authorized_keys >> ./authorized_keys
- Build a docker image
$ sudo docker build -t jupyter .
- Run in the background
$ sudo docker run -p 18888:8888 -p 10022:22 -v workdir:/workdir -d jupyter
- Login with ssh
$ ssh -p 10022 -i ~/.ssh/id_rsa [email protected]