In the last post, as part of our on-going Docker Tutorial Series, we discussed Docker Hub and Docker Registry API. In today’s post, let’s delve into Docker Remote API.
Docker Remote API
Docker Remote API is a REST API that replaces the remote command line interface — rcli. For the purpose of this tutorial, we have used cURL which is a command line tool that handles url manipulations. It helps make requests, get and send data, and retrieve information.
List containers – Get the list of all containers using the following command:
Create a new container – A new container can be created using:
Inspect Container- The command used to return low-level information about a container with the id is:
Process List – To obtain the list of processes running inside a container, use:
Container Logs – Collect stdout and stderr logs from the container using:
Export Container – Use the following command to export the contents of the container:
Start a container – Use command:
Stop a container – Use command:
Restart a Container – Use command:
Kill a container – Use command:
Now that we’ve taken you on the next leg of this Docker API journey, watch out for the continuation of this post to learn about Docker Remote API commands for Images. It’s all part of our on-going Docker Tutorial Series that you can find here every Thursday.
Until next time, look over Flux7’s Docker Assessment Program! It’s designed to review and solve how your developer workflows can be optimized using Docker. To learn more now about the assessment and using Docker, simply inquire at email@example.com or click here. Or, just visit us today at https://flux7.com/docker-solution/.