server-setup/Docker/README.md

42 lines
1.3 KiB
Markdown
Raw Normal View History

2021-12-08 07:28:28 +01:00
# Install Docker on Debian
## Prepare the system
```sudo apt-get update```
```sudo apt-get install ca-certificates curl gnupg lsb-release```
```curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg```
```echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.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
```sudo apt-get update```
```sudo apt-get install docker-ce docker-ce-cli containerd.io```
2022-06-30 08:47:53 +02:00
## Install Docker Compose
2021-12-08 07:28:28 +01:00
2021-12-10 09:08:43 +01:00
```sudo mkdir -p /usr/local/lib/docker/cli-plugins```
2021-12-08 07:28:28 +01:00
2022-06-30 08:47:53 +02:00
x86/64 Systems:
2022-02-18 15:55:16 +01:00
2022-06-30 08:47:53 +02:00
```sudo curl -SL https://github.com/docker/compose/releases/download/v2.6.1/docker-compose-linux-x86_64 -o /usr/local/lib/docker/cli-plugins/docker-compose```
2021-12-08 07:28:28 +01:00
2022-06-30 08:47:53 +02:00
ArmV7 Systems:
2022-02-18 15:55:16 +01:00
2022-06-30 08:47:53 +02:00
```sudo curl -SL https://github.com/docker/compose/releases/download/v2.6.1/docker-compose-linux-armv7 -o /usr/local/lib/docker/cli-plugins/docker-compose```
2022-02-18 15:55:16 +01:00
2021-12-10 09:08:43 +01:00
```sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose```
2021-12-08 07:28:28 +01:00
## Verify
```docker --version``` -> Docker version ..., build ...
2021-12-08 07:29:09 +01:00
2022-06-30 08:47:53 +02:00
```docker compose version``` -> Docker Compose version v2.6.1
2021-12-08 07:28:28 +01:00
## Add current user to the docker group
2021-12-10 09:08:43 +01:00
```sudo usermod -aG docker ${USER}```