美文网首页
Docker服务端开放Remote API

Docker服务端开放Remote API

作者: 安安汐而 | 来源:发表于2018-09-30 13:56 被阅读0次

    安装参考
    http://www.runoob.com/docker/centos-docker-install.html

    1、先备份docker配置

    cp /usr/lib/systemd/system/docker.service /usr/lib/systemd/system/docker.service_bak
    

    2、编辑docker.service

     vim /usr/lib/systemd/system/docker.service 
    

    在 ExecStart=/usr/bin/dockerd-current 后 增加 -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock
    3、重启docker重新读取配置文件,重新启动docker服务

    systemctl daemon-reload
    systemctl restart docker
    

    4、开启防火墙端口

    5、另外一台机器查看

    docker -H tcp://ip:2375 images
    

    相关文章

      网友评论

          本文标题:Docker服务端开放Remote API

          本文链接:https://www.haomeiwen.com/subject/agrwoftx.html