Set Docker_Opts in centos

后端 未结 12 1685
我在风中等你
我在风中等你 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:44

    With Docker 1.7.1 on CentOS 7 neither modifying /usr/lib/systemd/system/docker.service or /etc/sysconfig/docker worked for me. It seems that in systemd sets up the socket, so in order to change the group you have to edit SocketGroup in /usr/lib/systemd/system/docker.socket

    [Unit]
    Description=Docker Socket for the API
    PartOf=docker.service
    
    [Socket]
    ListenStream=/var/run/docker.sock
    SocketMode=0660
    SocketUser=root
    SocketGroup=jenkins
    
    [Install]
    WantedBy=sockets.target
    

提交回复
热议问题