这些天研讨怎样模块化开发,所以折腾起了Docker,发现它有点皮,根据官网的教程设备后运行sudo systemctl start docker。成果,他跑不起来。他跑不起来怎样让我Hello world呢?

(base) [sjson是什么意思teven@localhost ~]$ sudo systemctl start docker
Job for docker.service failed because the control process exited with error code.
Sejson字符串e "systemctdocker和虚拟机的差异l status docker.servi教程之家ce" and "journalctl -xeu docker.service" forjson格局怎么翻开 details.

履行jourdocker面试题及答案nalctjsonpl -xeu docker.service

Jul 07 20:10:56 localhost.localdomain systemd[1]: docker.service: Start request repeated too quickly.
Jdocker命令ul 07 20:10:docker装置布置56 localhost.localdomain systemd[docker和虚拟机的差异1]: docker.service: Failed with result 'exit-code'.

解决方案

网上大多是改deamon.json或是履行sudo rm教程之家 -rf /vjsonar/lib/docker,我试了之后没什么作用。还好有全能的Bing在stack overflow里找到了一个靠谱的。(62的useful)

(base) [steven@localhost ~]$ firewall-cm教程拼音d --get-active-zones
FedoraWorkstatdocker装置布置ion
interfaces: ens33
libvirt
interfaces: virbr0
trusted
interfaces: docker0
(base) [steven@localhost ~]$json字符串 sudo firewall-cmd --zone=docker --cdocker菜鸟教程hange-interface=docker0
succe教程之家ss
(base) [steven@ljson字符串ocalhost ~]$ firewall-cmd --get-active-zones
FedoraWorkstation
interfaces: ens33
docker
interfaces: docker0
libvirt
interfaces: virbdocker菜鸟教程r0
(base) [steven@localhost ~]$ sudo systemctl start docker # 这儿主张距离一段时间,再履行

看心爱的Hello world出来了:

(base) [steven@locdocker是干什么的alhost ~]$ sudo docker run hello-world
Hello from Docker!

引用

  • [failed to start daemon: Error initializing netjson数据work controller: Error creating defadockerfileult “bridge” network

](stackoverflow.com/questions/6…)