Painted-Fox / docker-postgresql

A dockerfile that produces a docker image that runs postgresql.
MIT License
72 stars 57 forks source link

Enable SSH access to container #7

Open pengux opened 10 years ago

pengux commented 10 years ago

An idea is to use the ADD command to add an authorized_keys file to the image when it is being built

jonmorehouse commented 10 years ago

hmm ... I'm not sure this one makes sense. I'd argue that ssh'ing into a docker box is kind of missing the essence of using it

jonmorehouse commented 10 years ago

@Painted-Fox what are your thoughts on this one? I think we could close this for now ...

Painted-Fox commented 10 years ago

WIth @pengux's change 60f2ec5f633dd4e2a6fc534982bace0df30500f7, we switched to using phusion/baseimage, which comes with support for SSH out of the box. There's even a helpful section in their README about Login to the container via SSH.

I've disabled SSH for now, but I think SSH will be useful (especially for troubleshooting long running containers). I haven't put too much thought into this feature yet.

jpetitcolas commented 10 years ago

Just for record, if you want to troubleshoot easily a Docker container, you can use nsenter. This way, no need of SSH.