# Docker

## Docker 101

### What is container?

A container is another process on your machine that isolated from all other processes on the host.

### Why Docker?

### What is Docker?

<figure><img src="https://miro.medium.com/v2/resize:fit:1400/format:webp/1*uyWvfu2hoE84sgMcr-DXYQ.png" alt=""><figcaption></figcaption></figure>

### Docker architecture

Docker use client-server architecture.

<figure><img src="https://docs.docker.com/assets/images/architecture.svg" alt=""><figcaption></figcaption></figure>

* **Docker client:** the `CLI tool` used to interact with Docker deamon through API, to manage images, containers, networks and other Docker components.
* **Docker deamon**: background process that manages Docker containers, images, networks, and volumes. It is continuously listening for API requests from Docker Client.
* **Docker registry**: repositories where Docker images are stored and shared. Docker Hub is a public registry maintained by Docker.
* **Docker image**: packages that contain everything needed to run an application (app code, libraries, and dependencies)
* **Docker container**: instance of Docker images that are created and run on a host system.
  * Each container *separated* from other containers and the host. But they can connect with other containers and outside world through network interface.
* **Docker network**: virtual networks that connect Docker containers to each others & outside the world.

### Docker CLI

### Docker Images

### Docker Networking

### Docker Registry

## SWARM

## vs. Kubernetes

## Best practices

## Resources

{% embed url="<https://labs.play-with-docker.com/>" %}
A simple, interactive and fun playground to learn Docker
{% endembed %}


---

# Agent Instructions: 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://mamawhocode.gitbook.io/devops/devops-tools/docker.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.
