ubuntu docker open RESTAPI

systemctl edit docker.service


Add the following:

[Service]
ExecStart=

ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2375


Ctrl+X to exit, save the file content, do not modify the file name, press enter 


ps to | grep dockerd  

The following content appears to indicate success.

root      4029  0.1  1.3 516588 41224 ?        Ssl  12:38   0:02 /usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2375


Access test:

curl 127.0.0.1:2375/info





Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325731045&siteId=291194637