Set Docker_Opts in centos

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

    Based on https://docs.docker.com/engine/admin/configuring/

    sudo mkdir /etc/systemd/system/docker.service.d
    sudo vi /etc/systemd/system/docker.service.d/docker.conf

    [Service]
    ExecStart=
    ExecStart=/usr/bin/docker daemon -H fd:// -D -H tcp://127.0.0.1:4243
    

    sudo systemctl daemon-reload
    sudo systemctl restart docker

提交回复
热议问题