I want to connect to a Windows Server Where Docker is Running (Windows Server 2016) and do all the docker operations programmatically using Rest Calls. Can Anyone provide me the Docker Rest API to connect to Windows Server and perform those operations like Docker Container Creation?
Asked
Active
Viewed 404 times
1
-
1Possible duplicate of [How do I enable the Docker RestAPI on Windows Containers?](https://stackoverflow.com/questions/37854161/how-do-i-enable-the-docker-restapi-on-windows-containers) – andolsi zied Feb 04 '19 at 10:27
-
Just remember that doing this has massive security implications: on Linux, anyone who can reach the socket has unrestricted administrator access on the host and can edit any file on the system and do anything. I think it's slightly more controlled on MacOS/Windows but it's still not something I'd do casually (or at all). – David Maze Feb 04 '19 at 12:09
1 Answers
0
Check docker engine api. It gives you some REST endpoints like, GET /containers/json
to list all containers.
If you are looking for programmatically doing REST API calls in C#, you can look into Docker.DotNet.
You can use Git Bash for Windows to query something like
curl http://localhost:2375/containers/<your_conatiner_name>/stats
Or, if you want to remotely request docker demon then follow this post

prisar
- 3,041
- 2
- 26
- 27