1.9 KiB
1.9 KiB
Procedure
-
Run
apt udpate
-
Install the following:
apt install ca-certificates curl
-
Create the keyrings directory with correct permissions:
install -m 0755 -d /etc/apt/keyrings
-
Save the current key from Docker:
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
-
Allow everybody to read the
docker.asc
key:chmod a+r /etc/apt/keyrings/docker.asc
-
Add the official Docker repository to apt:
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
-
Run
apt update
again -
Install the required Docker packages:
apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
-
Test that Docker is installed via
docker --version
-
Test the Docker
hello-world
image:docker run hello-world
Administration
-
Create a volume for Portainer:
docker volume create portainer_data
-
Install Portainer:
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:2.20.3
Note: The version number
2.20.3
is current at the time of writing but may change in the future -
Connect to Portainer's web interface by visiting port 9443 in the address bar, e.g. https://debian-host:9443/
Extras
- If installing a Microsoft SQL Server for Linux container running Ubuntu, create a volume that maps to
/var/opt/mssql/data
in the container. The databases you create will persist across recreating or duplicating/editing. No additional configuration is needed.