Set Docker_Opts in centos

后端 未结 12 1712
我在风中等你
我在风中等你 2021-01-31 04:44

I need to set docker to listen to tcp://0.0.0.0/4243 on my host machine running amazon linux (centos). All the documentation I have seen has told me to run the following command

12条回答
  •  暖寄归人
    2021-01-31 05:37

    I needed to change the default bridge interface docker0 to use my own bridge interface br0 and putting the following content in that file solved my issue:

    CentOS 7.2 and docker 1.10.3

    /usr/lib/systemd/system/docker.service.d/docker.conf

    [Service] 
    ExecStart=
    ExecStart=/usr/bin/docker daemon --bridge=br0 -H fd://
    

    and of course the following need to be performed after:

    sudo systemctl daemon-reload
    
    sudo systemctl restart docker 
    
    ip link del docker0
    

提交回复
热议问题