3 ms·
I was hoping that Docker 1.0 would have a 'docker login' or 'docker shell' command for spawning a shell within the container. In baseimage-docker (https://githu
by FooBarWidget 12y ago
I was hoping that Docker 1.0 would have a 'docker login' or 'docker shell' command for spawning a shell within the container. In baseimage-docker (https://github.com/phusion/baseimage-docker https://github.com/phusion/baseimage-docker), we run an SSH daemon so that people can login to the container for administrative purposes. In the past, it that approach was criticized because it was also possible to use lxc-attach, but since Docker 0.8 or 0.9 lxc-attach is not usable anymore because the default Docker backend no longer uses LXC. The Docker authors promised they would have a solution in the future, but sadly it didn't make it to 1.0. I guess we'll continue to use SSH until they have an official solution.
- heavenlyhash 12y agohttps://github.com/polydawn/siphon-cli https://github.com/polydawn/siphon-cli might address your needs for now. It's just a tiny little wrapper around terminals that shuttles the connection over a unix socket... which in the case of docker, you can put on a mount to access from the host. Author here; I built it to replace that use case of sshd with something that doesn't have the overhead of key management. Of course if you're doing something with network gaps involve, sshd might still be the right answer for you.
- MoOmer 12y agoI still use this on 0.11: docker ps -l --no-trunc lxc-attach -n xxxxxxxxxx