By default, Docker only allows the operation of Docker Daemon through UNIX socket communication, but sometimes we want to invoke its rest API via HTTP, and we need to configure the startup parameters separately
In order to make the configuration permanent, modify its profile/etc/default/docker in Ubuntu environment, add docker_opts= "-h=unix:///var/run/docker.sock-h=0.0.0.0:6732", Restart the Docker service with browser access to the settings host: Port number (6372)/Docker API Operation Docker, followed by an API-based how to make a simple management tool, first a prototype diagram
# docker upstart and sysvinit configuration file
# Customize location of the Docker binary (especially for development TES Ting).
#DOCKER = "/usr/local/bin/docker"
# Use Docker_opts to modify the daemon startup options.
#DOCKER_OPTS = "--dns 8.8.8.8--dns 8.8.4.4"
docker_opts= "-h=unix:///var/run/docker.sock-h=0.0.0.0:6732"
# If you need Docker-to-use an HTTP proxy, it can also is specified here.
#export http_proxy= "http://127.0.0.1:3128/"
# This was also a handy place to tweak where Docker ' s temporary files go.
#export tmpdir= "/mnt/bigdrive/docker-tmp"