Skip to content

Commit b3cdb26

Browse files
committed
2 parents 325c127 + 9417b74 commit b3cdb26

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

_posts/2023-01-01-lxc-docker-setup.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,27 @@ sudo docker run hello-world
3838

3939
## Install Docker Compose
4040

41-
Debian unfortunately only ships with docker compose v1. The plugin for v2 needs to be installed manually from github releases. Keep in mind the version number can be whatever is the latest (v2.14.2 as of this post).
41+
Debian unfortunately only ships with docker compose v1. The plugin for v2 needs to be [installed from dockers package repo](https://docs.docker.com/engine/install/debian/#install-using-the-repository)
4242

4343
```bash
44-
mkdir -p ~/.docker/cli-plugins
44+
# Add Docker's official GPG key:
45+
sudo apt-get update
46+
sudo apt-get install ca-certificates curl gnupg
47+
sudo install -m 0755 -d /etc/apt/keyrings
48+
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
49+
sudo chmod a+r /etc/apt/keyrings/docker.gpg
50+
51+
# Add the repository to Apt sources:
52+
echo \
53+
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
54+
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
55+
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
4556
```
4657

47-
```bash
48-
curl -sSL https://github.com/docker/compose/releases/download/v2.14.2/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
49-
```
58+
Then update and install docker compose
5059

5160
```bash
52-
chmod +x ~/.docker/cli-plugins/docker-compose
61+
sudo apt update && sudo apt install docker-compose-plugin
5362
```
5463

5564
Now check to make sure v2 is installed

0 commit comments

Comments
 (0)