Quelle: https://docs.docker.com/install/linux/d ... repository
Für Debian:
Code: Select all
apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common
Code: Select all
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
Code: Select all
apt-key fingerprint 0EBFCD88
Code: Select all
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
Code: Select all
apt update && apt install docker-ce
Bezugsquelle für fertige Docker Container: https://hub.docker.com/
Docker Container über Dockerhub beziehen
Beispieldocker pull $dockercontainer$
Code: Select all
docker pull nginx
Docker Installation testen
Code: Select all
docker run hello-world
Docker Prozesse anzeigen lassen# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
d1***2****c****0*: Pull complete
Digest: sha256:**************d*************6****************7*************
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/
Code: Select all
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
*****e*******8******** hello-world "/hello" 18 seconds ago Exited (0) 16 seconds ago heuristic_mccarthy
**a******4******1***** nginx "-d -p 80" 3 minutes ago Created 80/tcp upbeat_banzai
***c*****1****5******* nginx "nginx -g 'daemon of…" 4 minutes ago Exited (0) 4 minutes ago happy_elgamal
Docker Container starten
Quelle: https://www.digitalocean.com/community/ ... untu-14-04
Code: Select all
sudo docker run --name docker-nginx -p 80:80 -d nginx
Docker Container stopen
Code: Select all
docker stop docker-nginx && docker rm docker-nginx
Docker Kommando Übersicht unter https://docs.docker.com/engine/reference/commandline/