Close Menu
Luminari | Learn Docker, Kubernetes, AI, Tech & Interview PrepLuminari | Learn Docker, Kubernetes, AI, Tech & Interview Prep
  • Home
  • Technology
    • Docker
    • Kubernetes
    • AI
    • Cybersecurity
    • Blockchain
    • Linux
    • Python
    • Tech Update
    • Interview Preparation
    • Internet
  • Entertainment
    • Movies
    • TV Shows
    • Anime
    • Cricket
What's Hot

Tornado Cash dev’s attorneys say prosecutors hid exculpatory evidence

May 18, 2025

Grok says it’s ‘skeptical’ about Holocaust death toll, then blames ‘programming error’

May 18, 2025

Wes Anderson Thrills Cannes With ‘The Phoenician Scheme’ Premiere

May 18, 2025
Facebook X (Twitter) Instagram
Facebook X (Twitter) Instagram
Luminari | Learn Docker, Kubernetes, AI, Tech & Interview Prep
  • Home
  • Technology
    • Docker
    • Kubernetes
    • AI
    • Cybersecurity
    • Blockchain
    • Linux
    • Python
    • Tech Update
    • Interview Preparation
    • Internet
  • Entertainment
    • Movies
    • TV Shows
    • Anime
    • Cricket
Luminari | Learn Docker, Kubernetes, AI, Tech & Interview PrepLuminari | Learn Docker, Kubernetes, AI, Tech & Interview Prep
Home » Docker API Services: Unlocking the Power of Containerization
Docker

Docker API Services: Unlocking the Power of Containerization

HarishBy HarishJuly 16, 2024Updated:April 18, 2025No Comments4 Mins Read
Facebook Twitter Pinterest LinkedIn Reddit WhatsApp Email
Share
Facebook Twitter Pinterest Reddit WhatsApp Email

As the world continues to evolve towards containerization, Docker has emerged as the industry leader in providing a robust platform for deploying, managing, and orchestrating containers. One of the most powerful features of Docker is its comprehensive API (Application Programming Interface) that allows developers to automate, manage, and integrate their containerized applications seamlessly. In this blog post, we will delve into the world of Docker API services, exploring what they are, how they work, and the numerous benefits they offer.

What are Docker API Services?

Docker API is a RESTful (Representational State of Resource) interface that provides a programmatic way to interact with your containerized applications. The API allows you to perform various operations on containers, such as creating, starting, stopping, and removing them, all without having to manually execute commands through the command-line interface or Docker Compose.

Key Features of Docker API Services

1. Container Management: Docker API enables you to create, start, stop, pause, and remove containers, as well as retrieve information about their status, ports, and environment variables.

2. Image Management: You can pull, push, tag, and delete images from your container registry, making it easy to manage and distribute your containerized applications.

3. Network Management: Docker API allows you to create, inspect, and remove networks, as well as attach and detach containers to them.

4. Volume Management: You can create, inspect, and remove volumes, which enables you to persist data even after a container is deleted or restarted.

How Do Docker API Services Work?

To use the Docker API, you need to send HTTP requests to the Docker daemon, which is responsible for managing your containers. The Docker daemon listens on a Unix socket or TCP port by default and responds with JSON-formatted data.

Expose your docker API service

There are multiple ways we can do this, By enabling remote access to machine can also accept the request from out side of local machine. I will leave how use can use it to your imagination.

There are multiple way to do this as mentioned in docker documentation : https://docs.docker.com/config/daemon/remote-access/ , we felt configure through systemd is easy

Configuring Remote access via systemd
  1. Use the command sudo systemctl edit docker.service to open an override file for docker.service in a text editor.

  2. Add or modify the following lines, substituting your own values.

  3. save the file

  1. Reload the systemctl configuration. -> “sudo systemctl daemon-reload”

  2. Restart Docker. $-> “sudo systemctl restart docker.service”

  3. Verify that the change has gone through.

Identify Docker API version

There is a better way to find, But easy way to get is run any docker api request as shown below. docker will show its supported version.

In my case I got an error as : {“message”:”client version 1.44 is too new. Maximum supported API version is 1.43″}

So changed above request to v1.43, then it worked.

Simple script using python

Lets see how we utilize this power with python

With this simple get request ,i was able to access docker Api service

output:

[{‘Id’: ‘5c9c738fc994360ce85a294ec05c2dedaa08ff218898ca5b0e1a3d0e2c5f63f7’, ‘Names’: [‘/open-webui’], ‘Image’: ‘ghcr.io/open-webui/open-webui:main‘, ‘ImageID’: ‘sha256:5cd3b777b8d87b85b52bccfd1a35e97717242fc19a809553c0c13d6db3d9bcaa’, ‘Command’: ‘bash start.sh‘, ‘Created’: 1719382198, ‘Ports’: [{‘IP’: ‘0.0.0.0’, ‘PrivatePort’: 8080, ‘PublicPort’: 3000, ‘Type’: ‘tcp’}, {‘IP’: ‘::’, ‘PrivatePort’: 8080, ‘PublicPort’: 3000, ‘Type’: ‘tcp’}], ‘Labels’: {‘org.opencontainers.image.created’: ‘2024-06-17T05:53:17.029Z’, ‘org.opencontainers.image.description’: ‘User-friendly WebUI for LLMs (Formerly Ollama WebUI)’, ‘org.opencontainers.image.licenses’: ‘MIT’, ‘org.opencontainers.image.revision’: ‘9e4dd4b86f77653b59dc1fa97fe3f72e8252b359’, ‘org.opencontainers.image.source’: ‘https://github.com/open-webui/open-webui‘, ‘org.opencontainers.image.title’: ‘open-webui’, ‘org.opencontainers.image.url’: ‘https://github.com/open-webui/open-webui‘, ‘org.opencontainers.image.version’: ‘main’}, ‘State’: ‘running’, ‘Status’: ‘Up 2 hours (healthy)’, ‘HostConfig’: {‘NetworkMode’: ‘default’}, ‘NetworkSettings’: {‘Networks’: {‘bridge’: {‘IPAMConfig’: None, ‘Links’: None, ‘Aliases’: None, ‘NetworkID’: ‘f3a57db4b413a44c59cc52ceae9aa7cb04b5f9cdbf7f4e7e4f3982db93172c64’, ‘EndpointID’: ’15dcb9ae577a92e9d6cce90f5aa745f5a0959cdd860b9e14f0ca2b56f268d10a’, ‘Gateway’: ‘172.17.0.1’, ‘IPAddress’: ‘172.17.0.2’, ‘IPPrefixLen’: 16, ‘IPv6Gateway’: ”, ‘GlobalIPv6Address’: ”, ‘GlobalIPv6PrefixLen’: 0, ‘MacAddress’: ’02:42:ac:11:00:02′, ‘DriverOpts’: None}}}, ‘Mounts’: [{‘Type’: ‘volume’, ‘Name’: ‘open-webui’, ‘Source’: ‘/var/lib/docker/volumes/open-webui/_data’, ‘Destination’: ‘/app/backend/data’, ‘Driver’: ‘local’, ‘Mode’: ‘z’, ‘RW’: True, ‘Propagation’: ”}]}]

What next ?

Its fun rite?, If you wanna utilize api service to the fullest checkout the docker doc : https://docs.docker.com/engine/api/ , Remember to follow the version of your docker under “API reference by version”

Share. Facebook Twitter Pinterest LinkedIn WhatsApp Reddit Email
Previous ArticleLearn Docker for free : Docker network
Next Article Storage basic – how data stored? Copy
Harish
  • Website
  • X (Twitter)

Related Posts

Update on the Docker DX extension for VS Code

April 30, 2025

Docker Desktop 4.41 Release | Docker

April 29, 2025

How to build and deliver an MCP server for production

April 25, 2025

Introducing MCP Catalog and Toolkit

April 22, 2025

Master Docker and VS Code: Supercharge Your Dev Workflow

April 17, 2025

Docker Navigator: Think Big. Build Local. Run AI with Docker

April 17, 2025
Add A Comment
Leave A Reply Cancel Reply

Our Picks

Tornado Cash dev’s attorneys say prosecutors hid exculpatory evidence

May 18, 2025

Grok says it’s ‘skeptical’ about Holocaust death toll, then blames ‘programming error’

May 18, 2025

Wes Anderson Thrills Cannes With ‘The Phoenician Scheme’ Premiere

May 18, 2025

Anime Expo Hosts Mobile Suit Gundam GQuuuuuuX Staff, Naohiro Ogata, Peach-Pit, More – News

May 18, 2025
Don't Miss
Blockchain

Tornado Cash dev’s attorneys say prosecutors hid exculpatory evidence

May 18, 20252 Mins Read

Attorneys for Tornado Cash developer Roman Storm filed a motion asking the court to reconsider…

‘Bitcoin Standard’ author backs funding dev to make spamming Bitcoin costly

May 18, 2025

The Public internet is a bottleneck for blockchain — DoubleZero CEO

May 17, 2025

High-speed oracles disrupting $50B finance data industry — Web3 Exec

May 17, 2025

Subscribe to Updates

Subscribe to our newsletter and never miss our latest news

Subscribe my Newsletter for New Posts & tips Let's stay updated!

About Us
About Us

Welcome to Luminari, your go-to hub for mastering modern tech and staying ahead in the digital world.

At Luminari, we’re passionate about breaking down complex technologies and delivering insights that matter. Whether you’re a developer, tech enthusiast, job seeker, or lifelong learner, our mission is to equip you with the tools and knowledge you need to thrive in today’s fast-moving tech landscape.

Our Picks

Grok says it’s ‘skeptical’ about Holocaust death toll, then blames ‘programming error’

May 18, 2025

U.S. lawmakers have concerns about Apple-Alibaba deal

May 18, 2025

Microsoft’s Satya Nadella is choosing chatbots over podcasts

May 17, 2025

Subscribe to Updates

Subscribe to our newsletter and never miss our latest news

Subscribe my Newsletter for New Posts & tips Let's stay updated!

Facebook X (Twitter) Instagram Pinterest
  • Home
  • About Us
  • Advertise With Us
  • Contact Us
  • DMCA Policy
  • Privacy Policy
  • Terms & Conditions
© 2025 luminari. Designed by luminari.

Type above and press Enter to search. Press Esc to cancel.