Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.
| Beide Seiten, vorherige ÜberarbeitungVorherige ÜberarbeitungNächste Überarbeitung | Vorherige Überarbeitung | ||
| knowledge_base:linux:docker:setup [2022/06/02 10:49] – [Non-root] fix heading julian.lemmerich | knowledge_base:linux:docker:setup [2024/04/15 20:56] (aktuell) – remove CentOS, polish article julian.lemmerich | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== Docker | + | ====== Docker |
| - | + | ||
| - | ===== CentOS 7 ===== | + | |
| - | + | ||
| - | Install docker with | + | |
| - | + | ||
| - | <code bash> | + | |
| - | sudo yum install docker-engine | + | |
| - | </ | + | |
| - | + | ||
| - | Install docker-compose (from [[https:// | + | |
| - | + | ||
| - | <code bash> | + | |
| - | sudo curl -L " | + | |
| - | sudo chmod +x / | + | |
| - | </ | + | |
| - | + | ||
| - | Start docker | + | |
| - | <code bash> | + | |
| - | service docker start | + | |
| - | </ | + | |
| ===== Debian 10 ===== | ===== Debian 10 ===== | ||
| Zeile 27: | Zeile 7: | ||
| <code bash> | <code bash> | ||
| apt-get update | apt-get update | ||
| + | apt-get install ca-certificates curl gnupg lsb-release -y | ||
| - | apt-get install \ | + | mkdir -p /etc/apt/keyrings |
| - | | + | curl -fsSL https:// |
| - | ca-certificates \ | + | |
| - | curl \ | + | |
| - | gnupg-agent \ | + | |
| - | software-properties-common | + | |
| - | curl -fsSL https:// | + | echo \ |
| - | apt-key fingerprint 0EBFCD88 | + | "deb [arch=$(dpkg --print-architecture) signed-by=/ |
| - | + | $(lsb_release -cs) stable" | |
| - | add-apt-repository | + | |
| - | | + | |
| - | | + | |
| - | stable" | + | |
| apt-get update | apt-get update | ||
| - | apt-get install docker-ce docker-ce-cli containerd.io | + | apt-get install docker-ce docker-ce-cli containerd.io |
| + | </ | ||
| + | on kali the apt source needs to be manually edited to debian bookworm | ||
| + | |||
| + | < | ||
| #testing out | #testing out | ||
| docker run hello-world | docker run hello-world | ||
| </ | </ | ||
| - | ==== Docker Compose | + | ==== non-root user ==== |
| - | from https:// | + | ‼ This is basically equivalent |
| - | < | + | < |
| - | curl -L https:// | + | sudo groupadd |
| - | chmod +x / | + | sudo usermod |
| - | + | ||
| - | #test with | + | |
| - | docker-compose --version | + | |
| </ | </ | ||
| Zeile 67: | Zeile 41: | ||
| <code bash> | <code bash> | ||
| - | sudo apt-get install | + | sudo apt-get install ca-certificates curl gnupg lsb-release |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| curl -fsSL https:// | curl -fsSL https:// | ||
| echo \ | echo \ | ||
| Zeile 77: | Zeile 47: | ||
| $(lsb_release -cs) stable" | $(lsb_release -cs) stable" | ||
| sudo apt update | sudo apt update | ||
| - | sudo apt-get install docker-ce docker-ce-cli containerd.io | + | sudo apt-get install docker-ce docker-ce-cli containerd.io |
| </ | </ | ||
| - | |||
| - | ===== Non-root ===== | ||
| - | |||
| - | < | ||
| - | sudo groupadd docker | ||
| - | sudo usermod -aG docker $USER | ||
| - | </ | ||
| - | |||
| ===== Windows with WSL2 ===== | ===== Windows with WSL2 ===== | ||
| Zeile 94: | Zeile 56: | ||
| If the user is not admin, its needs to be added to a Group | If the user is not admin, its needs to be added to a Group | ||
| - | |||