$ sudo docker run -d centos:last
8022826ebd567e2b1818e90ce33c3b68ea9aeac0286001154eb05fc2283e0238
$ sudo docker exec -it 8022826ebd56 bash
出現: Error response from daemon: Container 8022826ebd567e2b1818e90ce33c3b68ea9aeac0286001154eb05fc2283e0238 is not running
解決方法:
先進行
sudo docker start 8022826ebd56
在試試 sudo docker exec -it 8022826ebd56 bash
看一下能不能進入容器
$ sudo docker run -d centos:last
8022826ebd567e2b1818e90ce33c3b68ea9aeac0286001154eb05fc2283e0238
$ sudo docker exec -it 8022826ebd56 bash
出現: Error response from daemon: Container 8022826ebd567e2b1818e90ce33c3b68ea9aeac0286001154eb05fc2283e0238 is not running
解決方法:
先進行
sudo docker start 8022826ebd56
在試試 sudo docker exec -it 8022826ebd56 bash
看一下能不能進入容器
8022826ebd56
在試試 sudo docker exec -it 8022826ebd56 bash
看一下能不能進入容器
8022826ebd56
在試試 sudo docker exec -it 8022826ebd56 bash
看一下能不能進入容器 sudo docker exec -it 8022826ebd56 bash
sudo docker exec -it 8022826ebd56 bash我在試了上面的方法仍是進不了用了ping www.baidu.com從新運行一個容器後能夠進入
$ sudo docker run -d centos:last ping www.baidu.com
68f371f3c7c707698183c1a71a7662424cae417e5fc003635c19b19055a3ad32
$ sudo docker ps -l
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
68f371f3c7c7 docker.io/centos "ping www.baidu.com
" 8 seconds ago Up 7 seconds serene_dubinsky
$ sudo docker exec -it 68f371f3c7c7 bash
正常進入
$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
68f371f3c7c7 docker.io/centos "ping www.baidu.com
" 10 minutes ago Up 8 minutes serene_dubinsky
8022826ebd56 docker.io/centos "/bin/bash" 17 minutes ago Exited (0) 13 minutes ago silly_kare
$ sudo docker rm 8022826ebd56
我在試了上面的方法仍是進不了用了ping www.baidu.com從新運行一個容器後能夠進入
$ sudo docker run -d centos:last ping www.baidu.com
68f371f3c7c707698183c1a71a7662424cae417e5fc003635c19b19055a3ad32
$ sudo docker ps -l
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
68f371f3c7c7 docker.io/centos "ping www.baidu.com
" 8 seconds ago Up 7 seconds serene_dubinsky
$ sudo docker exec -it 68f371f3c7c7 bash
正常進入
$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
68f371f3c7c7 docker.io/centos "ping www.baidu.com
" 10 minutes ago Up 8 minutes serene_dubinsky
8022826ebd56 docker.io/centos "/bin/bash" 17 minutes ago Exited (0) 13 minutes ago silly_kare
$ sudo docker rm 8022826ebd56
從新運行一個容器後能夠進入
從新運行一個容器後能夠進入ping www.baidu.com
ping www.baidu.com
ping www.baidu.com
ping www.baidu.com
ping www.baidu.com
ping www.baidu.comping www.baidu.com
ping www.baidu.com
ping www.baidu.com
ping www.baidu.com8022826ebd56
8022826ebd56