Zum Inhalt springen

Docker Installation unter Debian Linux: Unterschied zwischen den Versionen

Aus LHlab Wiki
Die Seite wurde neu angelegt: „Hier eine Kurze Anleitung wie man unter Debian 10 (Buster) Docker installiert.<br> Die ausführliche Anleitung zur Installation von Docker findet man auf der…“
 
KKeine Bearbeitungszusammenfassung
 
(8 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
Hier eine Kurze Anleitung wie man unter Debian 10 (Buster) Docker installiert.<br>
Hier eine Kurze Anleitung wie man unter Debian Linux Docker installiert.<br>


Die ausführliche Anleitung zur Installation von Docker findet man auf der Docker Webseite:
Die ausführliche Anleitung zur Installation von Docker findet man auf der Docker Webseite:
* https://docs.docker.com/install/
 
<source lang=bash>
*https://docs.docker.com/engine/install/debian/
apt-get install curl apt-transport-https ca-certificates gnupg2 software-properties-common -y
<syntaxhighlight lang="bash">
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
# Add Docker's official GPG key:
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
apt-get update
apt-get install ca-certificates curl
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc
 
# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update
apt-get update
apt-get install docker-ce docker-ce-cli containerd.io -y
 
</source>
apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
wenn alles geklappt hat sollte man nun mit dem folgenden Befehl ein "Hello World" ausgegeben bekommen:
</syntaxhighlight>
<source lang=bash>
wenn alles geklappt hat sollte man nun mit dem folgenden Befehl eine Docker Begrüßung ausgegeben bekommen:
<syntaxhighlight lang="bash">
docker run hello-world
docker run hello-world
</source>
</syntaxhighlight>
<pre>
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/
</pre>
 
== Memory Limits benutzen ==
Möchte man Container im RAM limitieren, hilft der Artikel weiter:
 
* [[Docker Container Memory Verbrauch begrenzen]]
{{#related:Debian Linux - Standard Grundsystem Installation}}
{{#related:Docker Compose Installation unter Debian Linux}}
 
[[Kategorie:Docker]]
[[Kategorie:Docker_Compose]]
[[Kategorie:Linux]]
[[Kategorie:Debian]]

Aktuelle Version vom 21. September 2025, 18:12 Uhr

Hier eine Kurze Anleitung wie man unter Debian Linux Docker installiert.

Die ausführliche Anleitung zur Installation von Docker findet man auf der Docker Webseite:

# Add Docker's official GPG key:
apt-get update
apt-get install ca-certificates curl
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update

apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

wenn alles geklappt hat sollte man nun mit dem folgenden Befehl eine Docker Begrüßung ausgegeben bekommen:

docker run hello-world
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/

Memory Limits benutzen

Möchte man Container im RAM limitieren, hilft der Artikel weiter: