Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.
| Beide Seiten, vorherige ÜberarbeitungVorherige ÜberarbeitungNächste Überarbeitung | Vorherige Überarbeitung | ||
| knowledge_base:linux:docker:setup [2021/11/22 11:45] – added WSL2 explanation 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://www.digitalocean.com/community/tutorials/how-to-install-docker-compose-on-debian-10-de | + | ‼ This is basically equivalent to sudo rights! Be careful! |
| + | |||
| + | < | ||
| + | sudo groupadd docker | ||
| + | sudo usermod -aG docker $USER | ||
| + | </ | ||
| + | |||
| + | ===== Ubuntu ===== | ||
| + | |||
| + | https://docs.docker.com/engine/install/ | ||
| <code bash> | <code bash> | ||
| - | curl -L https://github.com/docker/compose/releases/download/1.29.1/docker-compose-`uname | + | sudo apt-get install ca-certificates curl gnupg lsb-release |
| - | chmod +x /usr/local/bin/docker-compose | + | curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/ |
| - | + | echo \ | |
| - | #test with | + | "deb [arch=$(dpkg |
| - | docker-compose --version | + | |
| + | sudo apt update | ||
| + | sudo apt-get install docker-ce docker-ce-cli containerd.io | ||
| </ | </ | ||
| Zeile 68: | 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 | ||
| - | |||