首页 > 编程知识 正文

docker容器访问外部网络(docker应用访问外部文件系统)

时间:2023-05-05 13:28:03 阅读:68039 作者:2453

1、编辑docker.service # vim/usr/lib/systemd/system/docker.service

在ExecStart=/usr/义理果汁/dockerd-current之后增加

- htcp ://0.0.0. 0:2375-hunix ://var/run/docker.sock [ unit ] escription=dockerapplicationcontainerenginedocumentation=https://docs.docker.com after=network-online.targetfirewirewallater cker.socket containerd.service [服务] type=notify # thedefaultisnottousesystemdforcgroupsbecausethedelegateissuestistion existsandsystemdcurrentlydoesnotsupportthecgroupfeaturesetrequired # forcontainersrunbydockerexecstart=/usr /义气果汁/docker containerd.sock-htcp ://0.0. 033602375-hunix :///var/run/doon kill-shup $ mainpidtimeoutsec=0red 选项sweremovedfrom ' service ' to ' both the old,andnewlocationareacceptedbysystemd 229 andup, sousingtheoldlocation # tomakethemworkforeitherversionofsystemd.startlimitburst=3# notethatstartlimitintervalwasrenamedtostartlimitintervalsecinsystemd 230.# boththeold, andnewnameareacceptedbysystemd 230 andustemd ousingtheoldnametomake # thisoptionworkforeitherversionofsystemd.startlimimitiontervater

#系统重新启动坞站

[ root @ docker-servers~] # systemctldaemon-reload [ root @ docker-servers~] # systemctlrestartdocker [ root @ docker ] grep 2375 TCP 603360336033603360237533603360336033603360336033603360 * listen 96681/dockerd 3,开放防火墙端口# firewall-cmd---zone=pur

[根@ loot~~ ] #如果使用的是防火墙- cmd-- zone=公共- -添加-端口=2375/TCP-- permanent success云服务,则为

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。