1. How to install Docker
So, how do you get started using Docker? In general, when I use Docker, it's usually integrated into whatever operating system I tend to be using. Currently, in my UNRAID instance, Docker containers are installed through its applications page. When you install it here, you see a lot of variables that we're going to touch on later. Once something is deployed, the applications are managed through the Docker page going forward.
I also have a bare metal Ubuntu server with Docker installed. Installing Docker on an Ubuntu server is pretty easy; you can install it with apt using the following commands:
We will use the "convenience script" for one of the easiest ways to install it on your system. Once that's done, any future updates will also be available through apt. Here is the command to install using the script:
code@techhut:~
curl -fsSL https://get.docker.com | sudo sh
Regardless of how you install Docker on Ubuntu, the Docker systemd service will automatically start and enable. So, Docker will start automatically if the system is ever rebooted. You can check to see if it is running with the following command:
sudo systemctl status docker
2. Manage Docker as a non-root user
One step in the Linux post-installation steps is to manage Docker as a non-root user. To do this, you can add your user account to the docker group. This allows you to run Docker commands without using sudo them every time. However, it is important to note that adding a user to the docker group grants them significant privileges, as Docker allows direct access to the host system. Therefore, exercise caution when granting Docker access to non-root users, as it can potentially lead to security vulnerabilities if not properly managed and monitored.
If you want to do this, run the following commands:
code@techhut:~
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
Install docker
by
Tags: