1.2 Docker Compose
My preferred container system is docker. Docker allows to run multiple services in their own containers which makes maintenance much easier. The docker compose framework allows to set up docker container setups via simple configuration files.
To install the docker framework including the compose plugin you just have to install the
docker-compose-v2
package with following command:
sudo apt install docker-compose-v2
After the installation the docker
and the docker compose
commands are available.
To be able to execute docker
commands without the sudo
command you have to add youself to the docker
group.
This can be done with the following command:
sudo usermod -a -G docker <your_username>
Replace <your_username>
with your username.
You can test if docker can be called without sudo
by starting the docker hello world application:
docker run hello-world
If all went well, the hello-world image will be downloaded and you will see a hello world message from docker.