Docker Tutorial Series, Part 8: Docker Remote API
Docker Tutorial Series, Part 8: Docker Remote API
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 docker containers – Get the Docker container list using the following command:
GET /containers/json
Create a new container – A new container can be created using:
POST /containers/create
Inspect Container- The command used to return low-level information about a container with the id is:
GET /containers/(id)/json
Process List – To obtain the list of processes running inside a container, use:
GET /containers/(id)/top
Container Logs – Collect stdout and stderr logs from the container using:
GET /containers/(id)/logs
Export Container – Use the following command to export the contents of the container:
GET /containers/(id)/export
Start a container – Use Docker command:
POST /containers/(id)/start
Stop a container – Use Docker command:
POST /containers/(id)/stop
Restart a Container – Use Docker command:
POST /containers/(id)/restart
Kill a container – Use Docker command:
POST /containers/(id)/kill
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.
Other Tutorials in this series:
Docker Tutorial Series, Part 1: An Introduction | Docker Components
Docker Tutorial Series, Part 2: The 15 Commands
Docker Tutorial Series, Part 3: Automation is the Word Using DockerFile
Docker Tutorial Series, Part 4: Registry & Workflows
Docker Tutorial Series, Part 5: Docker Security
Docker Tutorial Series, Part 6: The Next 15 Docker Commands
Docker Tutorial Series, Part 7: Ultimate Guide for Docker APIs
Related Articles
IT Modernization and DevOps News Week in Review 1.18.2021
re:Invent Round-Up of AWS DevOps Announcements
Recent Posts
IT Modernization and DevOps News Week in Review 1.18.2021
re:Invent Round-Up of AWS DevOps Announcements
How Will SASE Change Networking in 2021?
AWS re:Invent Machine Learning Round-Up
How to Publish Managed Images to the Azure Marketplace
AWS re:Invent News Round-Up
Shave Days off Azure Marketplace Publishing with Automated Testing
IT Modernization and DevOps News Week in Review 11.30.2020
How To: Multi-Cluster Monitoring in Amazon EKS
IT Modernization and DevOps News Week in Review 11.16.2020