DEV Community

Shreyas Taware
Shreyas Taware

Posted on

Everything about Docker – Basics, MCPs, and more...

An image which has Docker logo, along with the text

If you are new to Docker or to Docker's newly released agentic features, this is a guide to help you understand it in the most jargon-free language as possible.

So, what is Docker?

Docker is a platform for developing, shipping, and running applications.

There are three main concepts in Docker:

  1. Container - Consider it as a smaller version of a computer but specific to the hardware it was created on. If you know what a Virtual Machine or VM is, a Container is just like that except its lightweight and shares resources with the computer while keeping the processes separate.

  2. Image - It is a set of instructions that when run create a container. You store those instructions in a file called as "Dockerfile".

  3. Registry - It is a location for storing and sharing container images.

Examples include Docker Hub, Amazon ECR, Azure ACR, Google's GCR

You can also create your own registry locally or shared it within a specific network and thus keep it privy to only that network.

Important Concept Alert

Whenever you create a Docker Container and run it, it serves a specific purpose: it might run a database, or keep a backend server running, or run a cron job.

But let's say we create our database in one container, and our backend server is in another.

Then we'll have to manually figure out the port connections from the database container to the backend one, thus adding more work and slowing down our deployment timelines.

This is when Docker Compose comes in.

Docker Compose: It is a command using which you can define multiple docker containers and store their configurations in a single YAML file.

This way all the containers get defined individually while "docker compose" takes care of the headache of connecting them.

–––

Before moving on to advanced concepts in Docker, here are few pre-requisites:

Model Context Protocol (MCP): It is a standardized open-source protocol for connecting AI applications to external systems and data sources.

Examples - ChatGPT can access your Notion Chats using Notion MCP.

Ask Gordon - It is the newly released AI-powered assistant specifically for Docker Desktop & Docker CLI.

Docker Model Runner (DMR): It lets you run, manage, and deploy AI models using Docker.

–––

Agentic workflows are created when AI tools are connected to disparate tools - and those tools require MCPs to orchestrate the agents's tasks.

To orchestrate MCPs, we need to understand about the MCP architecture.

MCP follows a client-server architecture that enables a standardized communication between AI applications and external tools.

MCP Client connecting MCP Server and in-turn to final data source (Github in this case)

MCP Servers - These are specialized programs that provide specific tools and capabilities to AI models through the Model Context Protocol.

MCP Clients - These act as the bridge between AI applications and MCP servers.

MCP Gateway - It is Docker's open-source solution which connects MCP servers to MCP clients.

We can connect one MCP client with multiple MCP servers, and conversly one MCP server with multiple MCP clients.

Thus, MCP clients and MCP servers have a many-to-many relationship, and MCP Gateway is what connects these two.

MCP Catalog - It is what hosts MCP servers.

MCP Clients connect through MCP Gateway to access the cataloged servers.

An image depicting how IDEs can connect to MCP Servers and how MCP servers are connected using the MCP catalog

MCP Toolkit - It is a gateway that lets you set up, manage, and run containerized MCP servers and connect them to AI agents.

Depending on the MCP server, the tools it provides might run within the same container as the server or in dedicated containers:

Single Container

Below you can see, multiple servers being spawned depending upon the operation:
Separate Containers

Docker Hub MCP server: It is a MCP server that interfaces with Docker Hub APIs to make rich image metadata accessible to LLMs thus enabling intelligent parsing and discovery of your Docker containers.

And that is it, these are all the the concepts of Docker you needed to know to get started to tinkering with MCPs using your favourite code editors and AI tools.

So, what are you waiting for?

–––

If you came till the end, thank you! This is just my second blog on the Dev platform!

If you liked this blog, please let me know in the comments!

Meme

Until next time,
Shreyas

Top comments (0)