/var/run/docker.sock is used by default for communication. You can use the -H parameter to specify the corresponding listening port. If you are using the default socket communication mode, you can use curl’s unix-socket method for testing.
The port here depends on the port bound to your docker daemon.
If no port is specified when the daemon is running, it will be used by defaultunix:///var/run/docker.sock
By default the Docker daemon listens on unix:///var/run/docker.sock and the client must have root access to interact with the daemon. If a group named docker exists on your system, docker applies ownership of the socket to the group. https://docs.docker.com/engin...
I adopt a compromise method here
Environment: MacOS
Type in the shell: vim ~/.bash_profile, type the following code at the end of the file
Save and exit, restart the shell.
Then you can use the dest command to implement some functions, such as listing images:
dest /images/json
/var/run/docker.sock is used by default for communication. You can use the -H parameter to specify the corresponding listening port.
If you are using the default socket communication mode, you can use curl’s unix-socket method for testing.
The above instructions are in
Can be executed normally
The port here depends on the port bound to your docker daemon.
If no port is specified when the daemon is running, it will be used by default
unix:///var/run/docker.sock
For example when running:
It is equivalent to binding the default socket to 2376 of the local machine, which is what you said
http://localhost:2376
If you don’t want to change the configuration file, just use the mirror to proxy. Pay attention to mounting
/var/run/docker.sock