Skip to the workspace
Pebellslearn by building
Installation and Setup  ›  Capstone Project

Docker Engine on Linux

Docker Engine ( Linux ) 14 minOn Linux, Docker Engine runs natively as a daemon, installed from Docker's package repository, and the docker group gives a user root-equivalent power over it.

docker / Docker Engine on Linux

Explore each scene at your own pace.

01 · The rule

The rule

Docker Engine on Linux

The server that will host quicknotes runs Ubuntu, with no screen and no dashboard. There, you do not need Docker Desktop at all: Linux already has the kernel containers need, so you install Docker Engine directly and run it as a background service.

The rule

On Linux, the Engine runs natively: no VM, just a daemon and a socket.

Docker Engine has three parts you should be able to name:

  • dockerd, the daemon, running as a system service;
  • the docker CLI;
  • the socket /var/run/docker.sock, the local door through which the CLI talks to the daemon.

The recommended install uses Docker's own package repository, which carries newer versions than most distributions' built-in packages. On Ubuntu, once that repository is added, the core install is:

sudo apt-get install docker-ce docker-ce-cli containerd.io \
  docker-buildx-plugin docker-compose-plugin
sudo systemctl enable --now docker
sudo docker run hello-world

enable --now starts the daemon immediately and on every boot. The official docs walk through adding the repository; follow them for your distribution rather than copying commands from old blog posts.

By default only root and members of the docker group may open the socket. To use Docker without sudo:

sudo usermod -aG docker $USER
# log out and back in so the new group applies

This comes with a serious warning: anyone who can talk to the daemon can start a container that mounts the host's whole filesystem as root. Membership in the docker group is effectively root access. Add only people you would trust with root. Docker also offers a rootless mode, where the daemon itself runs as an ordinary user, for machines where that trade-off is unacceptable.

Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.