baseimage-docker icon indicating copy to clipboard operation
baseimage-docker copied to clipboard

docker-bash won't run on boot2docker since bash is missing

Open amjibaly opened this issue 12 years ago • 5 comments

This new docker-bash feature looks really cool, would it be possible to get this to run in boot2docker however? If it's pretty easy to install bash in boot2docker then maybe it's not worth it but I'm not sure what that would take.

amjibaly avatar Jun 26 '14 18:06 amjibaly

I would hazard that docker-bash doesn't really need bash, and you could just change it to use whatever shell is actually provided by boot2docker... it's a very small script.

It's also worth looking at nsenter, I heard about this today: http://jpetazzo.github.io/2014/06/23/docker-ssh-considered-evil/

"The short version is: with nsenter, you can get a shell into an existing container, even if that container doesn't run SSH or any kind of special-purpose daemon."

On Thu, Jun 26, 2014 at 2:15 PM, amjibaly [email protected] wrote:

This new docker-bash feature looks really cool, would it be possible to get this to run in boot2docker however? If it's pretty easy to install bash in boot2docker then maybe it's not worth it but I'm not sure what that would take.

— Reply to this email directly or view it on GitHub https://github.com/phusion/baseimage-docker/issues/102.

kingdonb avatar Jun 26 '14 18:06 kingdonb

+1 for nsenter, that looks like a really good approach.

amjibaly avatar Jun 26 '14 18:06 amjibaly

nsenter looks really good. lxc-attach stopped working since Docker 0.9 but it looks like nsenter does the same thing.

That said, if your concern is boot2docker, then nsenter won't work either.

FooBarWidget avatar Jun 26 '14 18:06 FooBarWidget

Closing this issue. Discussion should be continued on #103.

FooBarWidget avatar Jul 13 '14 10:07 FooBarWidget

Fixed in commit 25e8b1c535fd.

FooBarWidget avatar Jul 13 '14 21:07 FooBarWidget