问题
I have Docker Desktop for Windows 1.12.1-stable(build: 7135) installed on my Windows 10 machine. I want to access docker using the remote API through port 4243
. I guess this port is not enabled by default. Do you have any idea how to open it?
回答1:
You can edit the configuration for docker daemon. Add a daemon.json file in the following path: %ProgramData%\docker\config
The file should contain something like this:
{
"hosts": ["tcp://0.0.0.0:4243"]
}
Then restart docker service.(eg Powershell: Restart-Service docker )
References:
How to use Remote API with Windows Container
Configuration File reference
来源:https://stackoverflow.com/questions/40385821/how-to-enable-docker-remote-api-in-docker-for-windows