I used this official guide to install Docker Containers on Windows. Everything looks good and I can run IIS on Windows Containers now.
However, I don't see it anywhere and have no idea on how to "Enable Rest API" for it. How can I do this?
Just came across the same issue, and discovered the REST API was already enabled!
set API=https://192.168.99.100:2376/v1.24/containers/json?all=1
set CERT=C:\Users\Nick\.docker\machine\machines\default
curl --cert "%CERT%/cert.pem" --cacert "%CERT%/ca.pem" --key "%CERT%/key.pem" "%API%"
Here's how I accessed the REST API from the windows cmd.
default > 192.168.99.100:2376)/v1.24/containers/json?all=1)C:\Users\Nick>docker --version
Docker version 18.03.0-ce, build 0520e24302
C:\Users\Nick>docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default - virtualbox Running tcp://192.168.99.100:2376 v18.03.0-ce
C:\Users\Nick>set DOCKER_CA=C:\Users\Nick\.docker\machine\machines\default
C:\Users\Nick>curl --cert "%DOCKER_CA%/cert.pem" --cacert "%DOCKER_CA%/ca.pem" --key "%DOCKER_CA%/key.pem" https://192.168.99.100:2376/v1.24/containers/json?all=1
[]
For those that are interested...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With