Launch Docker containers on Linux.

Instructions for installing Docker can be found on the manufacturer's site. For Debian / Ubuntu, I did the installation as follows.

Docker Engine vs. Docker Desktop

For Windows and MAC, Docker is available as Docker Desktop. The base for Docker on Windows and MAC provides a Linux virtual machine that allows Docker containers to run. In contrast, Linux with Docker Engine can use its own kernel and run Docker containers without a VM. So for Linux, I would use Docker Engine and not Docker Desktop:

sudo apt-get install ca-certificates curl gnupg lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli docker-compose-plugin

The current version, see:

Alternative: Ubuntu Server - Server Snaps

When setting up an Ubuntu server (, Docker can be selected directly during installation:

The Docker Container Runtime including Docker-compose is installed. 

Note: Snap has different default paths than a normal Docker installation: /var/snap/docker/common/var-lib-docker/. In addition, the Snap version runs in an isolated mode, which means Docker compose files cannot be launched from any folder. 

See also: Install Ubuntu Server


Docker-compose allows multiple Docker containers to be stored in a common docker-compose.yml file, allowing them to be started or upgraded together. Docker-compose can be added with the following commands:

sudo apt install docker-compose

Run Docker for a specific user without root

To allow the logged in user to execute Docker commands without "root", the user can be authorized as follows:

me@l1:~$ sudo apt install acl
me@l1:~$ sudo setfacl -m user:$USER:rw /var/run/docker.sock

Instructions for the following platforms

For the following platforms, there is a corresponding Docker installation guide on the vendor site:

  • Docker Desktop for Linux
  • Docker Desktop for Mac (macOS)
  • Docker Desktop for Windows
  • CentOS
  • Debian
  • Fedora
  • Raspberry Pi OS
  • RHEL
  • SLES
  • Ubuntu
  • Binaries


positive Bewertung({{pro_count}})
Rate Post:
{{percentage}} % positive
negative Bewertung({{con_count}})

THANK YOU for your review!

Updated: 2023-09-20 von Bernhard | Übersetzung Deutsch |🔔 | Comments:0

Docker Quick Start: Why? What are containers for? Hardware? | Docker | Launch Docker containers under Windows

Top articles in this section

Traefik: Forward traffic to another server

In preparation for moving my websites, I was looking for a way to simply forward all traffic from the old server to the new one.

Docker Compose vs. Docker Swarm: using and understanding it

Docker Swarm allows nodes (hosts) to be grouped together into a common federation. This allows containers to be run in any number of instances on any number of nodes (hosts) in the network. In Docker Swarm, the basis for communication between hosts is an overlay network for services: Multi-host networking. As indicated in my article on moving web servers, I tested Docker Swarm as a possible option for a shared cross-host network and gathered some insights on this, which I briefly summarize her...

Practice: Backup Docker container data: Volumes / Bind Mounts

In my article "All Docker containers: Moving hosts, theory and practice", I already went a little bit into the topic of backup. If you followed the article, you know that I outsource the data of my Docker containers via bind mounts and back them up with rsync. The backup job is started via crontab. But first, I thought about what actually needs to be backed up when using Docker in a single-server setup.

Questions / Comments

By continuing to browse the site, you agree to our use of cookies. More Details