> For the complete documentation index, see [llms.txt](https://42-guide.gitbook.io/42-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://42-guide.gitbook.io/42-guide/docker/docker-image-vs-docker-container.md).

# Docker image vs Docker Container

#### **Understanding Docker Image vs. Docker Container (Super Simple Explanation)**

Think of **Docker Image** as a **recipe** 📝 and **Docker Container** as the **cooked dish** 🍲.

**1. Docker Image = Blueprint (Recipe)**

* A **Docker Image** is like a **frozen pizza** 🍕 in a store.
* It contains **everything** needed to make the pizza (dough, cheese, toppings).
* You **cannot eat** a frozen pizza; it must be cooked first.

**2. Docker Container = Running Instance (Cooked Pizza)**

* A **Docker Container** is like a **pizza that’s baked and ready to eat** 🍽️.
* It is a **running version** of the image.
* You can create many pizzas (containers) from the same frozen pizza (image).

#### **Simple Example in Docker Commands**

1. **Create an image** (recipe)

   ```sh
   docker build -t my-app .
   ```
2. **Run a container** (cook & serve the pizza)

   ```sh
   docker run my-app
   ```

Every time you run `docker run`, you create **a new "cooked pizza" (container) from the same frozen pizza (image)**. 🚀


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://42-guide.gitbook.io/42-guide/docker/docker-image-vs-docker-container.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
