DOCKER_OPTS do not work in config file /etc/default/docker

前端 未结 9 1004
野性不改
野性不改 2020-12-13 09:59

I have changed /etc/default/docker with DOCKER_OPTS=\"-H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock\" (docker version 1.4.1 in ubuntu 14.0

9条回答
  •  渐次进展
    2020-12-13 10:51

    Well i have face a lot of issue in spinning on demand slave from jenkins because of docker daemon port restrictions.

    so i did

    sudo systemctl edit docker.service

    Added below section

    [Service]
    ExecStart=
    ExecStart=/usr/bin/docker daemon --host=tcp://0.0.0.0:2375
    

    Save the file

    run below command

    $ sudo systemctl daemon-reload
    $ sudo systemctl restart docker.service
    

    **NOTE: This will expose your daemon publicly and anyone with your ip and port can do any thing with your docker daemon **

提交回复
热议问题