Boot2docker/Windows: can't run bash on Ubuntu container

荒凉一梦 提交于 2019-12-03 00:35:50

This works for me:

docker run -t -i ubuntu //bin/bash

The double // avoids the conversion[1]

[1] http://www.mingw.org/wiki/Posix_path_conversion

I've just had the same problem, but

docker run -t -i ubuntu

opens up a shell inside the image.

It looks like your host's shell is automatically expanding /bin/bash to C:/Program Files (x86)/Git/bin/bash before it is passed to Docker, which isn't correct as obviously there isn't a C:/Program Files (x86)/Git/bin/bash inside the Ubuntu container.

Does using quotes fix the problem? For example:

docker run -i -t ubuntu "/bin/bash"
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!