Operate remote host docker command

Time:2021-12-22
  • Docker practice may require remote operation of docker commands, but due to security problems, this remote operation of docker is not adopted

Modify file/lib/systemd/system/docker.service

Operate remote host docker command

After execstart, add – H 0.0 0.0:8888
sudo systemctl daemon-reload
sudo systemctl restart docker
Then use docker on another host
docker -H 10.5.x.x:8888 ps -a
Safety settings can be referencedhttp://www.sohu.com/a/76802346_355135
Because I need to deploy the image circularly on the central server, this security policy is not suitable

This work adoptsCC agreement, reprint must indicate the author and the link to this article

Snowflakes floating