Setting up Docker


Probably the easiest way to install docker is via the installation script.

Install Docker on Debian

Open up the console or terminal and enter the following command(s),

This is totally optional, but once again you might want to create a docker folder or directory to your Downloads folder so the installation script is stored there.

curl -fsSL https://get.docker.com -o get-docker.sh

sh get-docker.sh

After the installation is finished, you might want to run the following command,

sudo usermod -aG docker $USER

The command above adds your username to the docker group.

If you are running software like Lando, maybe you need to install the docker-compose package separately.

It’s also possible that the docker doesn’t automatically start when the system boot’s up or reboot, so you can enable it with the following command,

sudo systemctl enable docker

Install Docker on Arch Linux

Run the following commands to install Docker on Arch Linux,

sudo pacman -S docker

or

yay -S docker

Enable and run Docker,

sudo systemctl enable docker && sudo systemctl start docker

Add user to Docker group,

sudo gpasswd -a $USER docker

or

sudo usermod -aG docker $USER

Source(s):