Skip to main content

Install docker - CLi / .sh

Set up the repository
  1. Update the apt package index and install packages to allow apt to use a repository over HTTPS:
sudo apt-get update
sudo apt-get install \
    ca-certificates \
    curl \
    gnupg \
    lsb-release
  1. Add Docker’s official GPG key:
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
  1. Use the following command to set up the repository:
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
 
Install Docker Engine
  1. Update the apt package index:
sudo apt-get update
  1. Install Docker Engine, containerd, and Docker Compose:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
  1. You can verify that Docker Engine is installed correctly by running the hello-world image.
sudo docker run hello-world
 
Install Portainer
  1. Create Docker Volume to store the data:
docker volume create portainer_data
  1. Install Portainer Server:
docker run -d -p 8000:8000 -p 9000:9000 --name portainer \
--restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \
portainer/portainer-ce:latest
 
Access Portainer Dashboard
  1. In a browser, visit the following address:
http://<yourmachineipadress>:9000
  1. The first time you access Portainer, the system asks to create a password for the admin user. Type the password twice and select the Create user button.

  2. Select the Get Started button to go to the dashboard and start using Portainer in the local environment only.

Install docker with script from https://get.docker.com:
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh

https://github.com/docker/docker-install