简体   繁体   中英

Error while running a container using docker

I have installed docker in my machine I could successfully pull images from the repository and the pulled images are clearly listed when I see the list of images pulled. The docker service was also started using

sudo service docker start

However, when I try to run the same using the command,

sudo docker run -it ubuntu:12.04 

I am getting the following error

docker: Error response from daemon: Container command '/bin/bash' not found or does not exist..

The issue remains the same for any image that I have tried with What could be the reason for this issue?

It depends on your version of docker, but check if you have issue 23411 , where adding a workdir is needed:

sudo docker run --workdir /var -it ubuntu:12.04 

There seem to be some recent bug in start.go , and a PR in progress .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM