Setup docker compose v2 » Historie » Version 3
Jeremias Keihsler, 18.03.2024 18:18
1 | 1 | Jeremias Keihsler | h1. Setup docker compose v2 |
---|---|---|---|
2 | |||
3 | https://goneuland.de/docker-docker-compose-v2-auf-ubuntu-22-04-lts-installieren/ |
||
4 | |||
5 | h2. uninstall old version of docker |
||
6 | |||
7 | <pre><code class="shell"> |
||
8 | for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done |
||
9 | </code></pre> |
||
10 | |||
11 | h2. add docker-repo |
||
12 | |||
13 | h3. remove olkt source-list |
||
14 | |||
15 | <pre><code class="shell"> |
||
16 | sudo rm /etc/apt/sources.list.d/docker.list |
||
17 | </code></pre> |
||
18 | |||
19 | |||
20 | h3. install dependencies |
||
21 | |||
22 | <pre><code class="shell"> |
||
23 | sudo apt update |
||
24 | sudo apt install ca-certificates curl gnupg |
||
25 | </code></pre> |
||
26 | |||
27 | h3. add keys |
||
28 | |||
29 | <pre><code class="shell"> |
||
30 | sudo install -m 0755 -d /etc/apt/keyrings |
||
31 | curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg |
||
32 | sudo chmod a+r /etc/apt/keyrings/docker.gpg |
||
33 | </code></pre> |
||
34 | |||
35 | h3. add repo |
||
36 | |||
37 | <pre><code class="shell"> |
||
38 | echo \ |
||
39 | "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ |
||
40 | "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ |
||
41 | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null |
||
42 | </code></pre> |
||
43 | |||
44 | h2. docker and docker compose install |
||
45 | <pre><code class="shell"> |
||
46 | |||
47 | sudo apt update |
||
48 | sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin |
||
49 | </code></pre> |
||
50 | |||
51 | check version: |
||
52 | |||
53 | <pre><code class="shell"> |
||
54 | sudo docker --version && docker compose version |
||
55 | </code></pre> |