Installing Docker

Now that we have the operating system installed, we can go on with installing Docker. In short, Docker is a tool to create and manage so-called containers. These containers run each particular software which they were built for. Besides the main software package, they will also include all the necessary dependencies to run this software. Containers have therefore the advantage that you don´t have to install the software on your server but rather have the software separated from the main system. This makes it possible to run many different applications on one server without the hassle of installing everything and watching out for maybe conflicts between two software packages. If you want to learn more about this topic, this website has a lot of helpful information and tutorials: A Docker Tutorial for Beginners

We want to use Docker to deploy all our main services on our Raspberry Pi. Installing Docker is rather simple, it just takes a few commands on the command line. Docker is most of the time installed via a convenience script provided by Docker itself.

pi@ioa-webserver:~ $ curl -fsSL get.docker.com | sh
pi@ioa-webserver:~ $ sudo apt-get install -y uidmap
pi@ioa-webserver:~ $ dockerd-rootless-setuptool.sh install
pi@ioa-webserver:~ $ sudo systemctl start docker
pi@ioa-webserver:~ $ sudo systemctl enable docker
pi@ioa-webserver:~ $ sudo usermod -aG docker $USER

After executing these commands, Docker was successfully installed and your user got configured for using it. These commands should™ be the same for all Debian-based Linux Systems.