How do I get the ports developed by docker api?

  docker, question

The new version of docker for Mac removes the docker-machine instruction.
How do I get the ports developed by rest api now?
For example:
curl -XGEThttp://localhost:2376/images/ …| python -mjson.tool

However, it does not seem to be the 2376 port above.
Thank you for your advice.

I am here through a compromise
Environment: MacOS
Type: vim ~/.bash_profile in the shell and type the following code at the end of the file

alias dest='rest_fun(){ curl --unix-socket /var/run/docker.sock http:$1 | python -mjson.tool ;  };  rest_fun $1'

Save to exit and restart the shell.
You can then use the dest instruction to implement some functions, such as listing images:
dest /images/json
图片描述