How to detect a docker daemon port

前端 未结 5 479
广开言路
广开言路 2021-01-30 01:48

I have installed Ubuntu and Docker. I am trying to launch Raik container:

$ DOCKER_RIAK_AUTOMATIC_CLUSTERING=1 DOCKER_RAIK_CLUSTER_SIZE=5 DOCKER_RIAK_BACKEND=lev         


        
5条回答
  •  我在风中等你
    2021-01-30 02:16

    1. Prepare extra configuration file. Create a file named /etc/systemd/system/docker.service.d/docker.conf. Inside the file docker.conf, paste below content:
    [Service]
    ExecStart=
    ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock
    

    Note that if there is no directory like docker.service.d or a file named docker.conf then you should create it.

    1. Restart Docker. After saving this file, reload the configuration by systemctl daemon-reload and restart Docker by systemctl restart docker.service.

    2. Check your Docker daemon. After restarting docker service, you can see the port in the output of systemctl status docker.service like /usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock.

    Hope this may help

    Thank you!

提交回复
热议问题