Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoiding passwords in Dockerfile (or having to type passwords is inconvenient anyway) #6

Open
bjornicus opened this issue Feb 17, 2019 · 1 comment

Comments

@bjornicus
Copy link

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.

@lifeisstillgood
Copy link
Member

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 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants