Joopi
[Allgemein] - Docker installieren - Druckversion

+- Joopi (https://forum.hermann-splitthoff.de)
+-- Forum: Wissenswertes (https://forum.hermann-splitthoff.de/forumdisplay.php?fid=1)
+--- Forum: Linux (https://forum.hermann-splitthoff.de/forumdisplay.php?fid=3)
+---- Forum: Docker (https://forum.hermann-splitthoff.de/forumdisplay.php?fid=28)
+---- Thema: [Allgemein] - Docker installieren (/showthread.php?tid=1373)



Docker installieren - Joopi - 23-11-2024

Docker über Repository installieren für Focal

Auf dieser Webseite habe ich die Installationsanleitung für Docker aus den Repositories für Ubuntu Focal gefunden:

Docker installation on Ubuntu Install via repository

Und hier kommt die Anleitung als Kopie der Webseite.


Docker installation on Ubuntu

Install via repository

Docker installation process on Ubuntu is practically the same as on Debian.

1. Update the distro and install necessary packages:

Code:
$ sudo apt update
$ sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

2. Second step is to add Docker GPG key for Docker

Code:
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

3. Verify the key fingerprint:

Code:
$ sudo apt-key fingerprint 0EBFCD88

4. Add the repository:

Code:
$ sudo add-apt-repository  "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

5. Install Docker:

Code:
$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io

6. Start and enable the Docker:

Code:
$ sudo systemctl start docker
$ sudo systemctl enable docker

7.  Test Docker also with the hello container

Code:
$ sudo docker run hello-world


Da Docker das IMG nicht findet, kommt erst eine Fehlermeldung, dann aber, wenn der Download erfolgreich war, die Meldung, dass alles gut ist. Sieht dann in der Konsole so aus:

Code:
user@user:/$ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
b8dfde127a29: Pull complete
Digest: sha256:0fe98d7debd9049c50b597ef1f85b7c1e8cc81f59c8d623fcb2250e8bec85b38
Status: Downloaded newer image for hello-world:latest

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/

Hello from Docker!** ist die richtige Meldung zum IMG.