TL;DR - Docker

Docker πŸ‹

Wow, you don’t know yet what is Docker? Well, let me introduce you this beautiful containerization tool.

Containers?

  • Container ~= virtual machine

A container is like a virtual machine that runs in background on your computer. It simulates a whole system in the same way.

  • Container > virtual machnie

But, a container is faster, better and stronger than a classical VM. Because it is meant to be fast and light-weight.

Images

Docker uses images to run containers. In short an image is a base container, which will be used by your container – like said – as a base. For example, I want to run an Ubuntu container, my Docker image will be something like:

1
2
3
FROM ubuntu:latest

RUN apt update

This file is called a Dockerfile, because it produces the corresponding Docker container when built.

When ran, this image will use the latest Ubuntu image in Docker’s database, amd update it.

You can do so much in a Docker image!

Build & run

Once you made your Dockerfile, you will use it to build your Docker image:

1
docker build -t my-image .
  • -t my-image: the tag (or name if you want) to give to your image
  • .: the directory where you put your Dockerfile

You now want to run it!

1
docker run my-image

And, voila! Your container is running!

Resources