$eval "$(docker-machine env --swarm swarm-master)"
The Chinese explanation of the above command is: “configure the current environment variable into the shell.”
But I didn’t understand, could you please explain what that means? What does it do?
The implementation results of docker-machine env are as follows:
$ docker-machine env default export DOCKER_TLS_VERIFY="1" export DOCKER_HOST="tcp://192.168.99.100:2376" export DOCKER_CERT_PATH="Y:\Users\YSTYLE\.docker\machine\machines\default" export DOCKER_MACHINE_NAME="default" # Run this command to configure your shell: # eval $("D:\Programming\Docker Toolbox\docker-machine.exe" env default)
Parameter –swarm swarm-master indicates that this doc is a swarm cluster.
Eval’s function is to parse the text into scripts and then execute them. here is to execute the results similar to the above, only setting a few environment variables.
The local docker cli actually sends instructions to damon via remote tcp.
The specific operation is which machine is specified by the environment variable DOCKER_HOST, and the space time is 127.0.0.1:2375