How to install docker and two docker containers

2 months ago
40

Here is a video on how to install docker on debian and two containers. One of them being portainer and homarr.

Portainer
https://docs.portainer.io/start/install-ce/docker/linux
Homarr
https://homarr.dev/docs/getting-started/installation/docker/
install Docker and Docker Compose on Debian 12, follow these steps:

Update your system and install necessary packages:
sudo apt update && sudo apt upgrade -y
sudo apt install ca-certificates curl gnupg lsb-release

Add the Docker GPG key and repository:
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

Add the Docker repository to APT sources:
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Update the package index and install Docker:
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Verify the installation by running the hello-world image:
sudo docker run hello-world

To manage Docker as a non-root user, add your user to the docker group:
sudo usermod -aG docker $USER

Log out and log back in for the changes to take effect.
Verify Docker Compose installation:

Loading 1 comment...