Docker Installation in Ubuntu 20.04
Das folgende Tutorial beschreibt die Installation und Docker Docker-compose Ubuntu 20.04.
Hergestellt mit nur wenigen Schritten.
Für den Anfang wird installieren wir Docker wird dies tun, mit dem Befehl:
1 | sudo apt install docker.io |
Dann fügen Sie den Dienst an das System:
1 | sudo systemctl enable --now docker |
Der Befehl sudo ohne Docker
Docker Standardverwaltungs sind Administratorrechte erforderlich.
den Befehl Andockfensters als anderer Benutzer als root Sudo ohne Vorbereitung auszuführen, Sie benötigen einen Benutzer zu einer Gruppe hinzufügen.
1 | sudo usermod -aG docker nasz_użytkownik |
Docker wir die Version durch Eingabe überprüfen:
1 | docker --version |
Testlauf, können wir den Behälter mit dem Befehl machen:
1 | docker run hello-world |
Eine ganze sollte funktionieren richtig
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | Hello from Docker! This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64) 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal. To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker ID: https://hub.docker.com/ For more examples and ideas, visit: https://docs.docker.com/get-started/ |
Installation Docker-compose
Wir machen Befehl installieren:
1 | apt install docker-compose |
Wir überprüfen die Version Befehl:
1 | docker-compose version |
1 2 3 4 | docker-compose version 1.21.0, build unknown docker-py version: 3.4.1 CPython version: 3.7.5 OpenSSL version: OpenSSL 1.1.1c 28 May 2019 |