# Docker

> The tool that made containers easy: package an app once, run it anywhere.

- Level: Intermediate
- Topics: Cloud, Software
- URL: https://tidbit.legios.com.ar/docker/
- In Spanish: [Docker](https://tidbit.legios.com.ar/es/docker/)

**Docker** is a set of tools for building and running containers, made by the company of the same name. Released in 2013, it took an old Linux idea and made it usable by any developer, which is why many people still say "a Docker" when they mean a container.

The workflow has three steps. You write a **Dockerfile**, a short text recipe: start from this base system, copy my code, install these libraries, run this command. `docker build` turns the recipe into an **image**, a sealed package with everything the app needs. `docker run` starts a container from that image, and you can start as many identical copies as you want.

Images are shared through a **registry**, a library of images; **Docker Hub** is the best-known public one, and clouds offer private ones like Amazon ECR. This is what makes Docker useful: the same image runs on a laptop, a test server and production, so "it works on my machine" stops being an excuse. The image format is now an open standard, so images built with Docker also run on Kubernetes and other tools that never touch Docker itself.

## An analogy

A Dockerfile is a recipe, the image is the frozen meal packed from it, and each container is one portion heated up. Any microwave heats it the same way.

## Keep in mind

- Dockerfile is the recipe, image is the package, container is the running copy.
- Registries such as Docker Hub store and share images.
- The image format is an open standard, so images run outside Docker too.
- Docker is the tool; the container is the general idea.

## Go deeper

- [What is Docker? (official docs)](https://docs.docker.com/get-started/docker-overview/)
- [Docker on Wikipedia](https://en.wikipedia.org/wiki/Docker_(software))

## Related terms

- [Container](https://tidbit.legios.com.ar/container/): A sealed box with a program and everything it needs to run anywhere.
- [Linux](https://tidbit.legios.com.ar/linux/): A free, open source operating system that runs most of the internet's servers.
- [Amazon ECR](https://tidbit.legios.com.ar/amazon-ecr/): A private warehouse on AWS for your container images, ready to be deployed.
- [Server](https://tidbit.legios.com.ar/server/): A computer whose job is to answer requests from other computers, all day, every day.
- [Open standard](https://tidbit.legios.com.ar/open-standard/): A public rulebook anyone can follow, so products from different makers work together.
- [Kubernetes](https://tidbit.legios.com.ar/kubernetes/): The system that runs and babysits containers across many machines.
