Setup docker compose v2 » Historie » Version 4
Jeremias Keihsler, 18.03.2024 18:19
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 | h3. install dependencies |
||
20 | |||
21 | <pre><code class="shell"> |
||
22 | sudo apt update |
||
23 | sudo apt install ca-certificates curl gnupg |
||
24 | </code></pre> |
||
25 | |||
26 | h3. add keys |
||
27 | |||
28 | <pre><code class="shell"> |
||
29 | sudo install -m 0755 -d /etc/apt/keyrings |
||
30 | curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg |
||
31 | sudo chmod a+r /etc/apt/keyrings/docker.gpg |
||
32 | </code></pre> |
||
33 | |||
34 | h3. add repo |
||
35 | |||
36 | <pre><code class="shell"> |
||
37 | echo \ |
||
38 | "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ |
||
39 | "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ |
||
40 | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null |
||
41 | </code></pre> |
||
42 | |||
43 | h2. docker and docker compose install |
||
44 | |||
45 | 4 | Jeremias Keihsler | <pre><code class="shell"> |
46 | 1 | Jeremias Keihsler | sudo apt update |
47 | sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin |
||
48 | </code></pre> |
||
49 | |||
50 | check version: |
||
51 | |||
52 | <pre><code class="shell"> |
||
53 | sudo docker --version && docker compose version |
||
54 | </code></pre> |