You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been playing around a bit with this starting with your base X11 capable docker image Dockerfile and wasn't satisfied with the password being hard coded in the Dockerfile, or really with having to type a password when I ssh to the container at all, so instead have set it up to use authorized_keys by mounting the public key as the authorized_keys file in the container:
docker run -d -p 2222:22 -v ~/.ssh/id_rsa.pub:/home/user/.ssh/authorized_keys devbox
Thats a nice idea - I have been distracted with some yak shaving and will get back to you - I would love to incorporate it and thank you for your efforts :-)
I've been playing around a bit with this starting with your base X11 capable docker image Dockerfile and wasn't satisfied with the password being hard coded in the Dockerfile, or really with having to type a password when I ssh to the container at all, so instead have set it up to use authorized_keys by mounting the public key as the authorized_keys file in the container:
docker run -d -p 2222:22 -v ~/.ssh/id_rsa.pub:/home/user/.ssh/authorized_keys devbox
Here's the gist with my whole dockerfile (setting it up to use vs code as the editor):
https://gist.github.com/bjornicus/66f03c93717590ae3e2694b759ef00db
Feel free to borrow from that if you like, or maybe you already have a solution to this and I just missed it.
The text was updated successfully, but these errors were encountered: