From 018152686b4156702d66ffc4cbd7c9cf98275e38 Mon Sep 17 00:00:00 2001 From: Malin Freeborn Date: Thu, 30 Dec 2021 15:17:09 +0000 Subject: [PATCH] add docker notes --- virtualization/docker.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/virtualization/docker.md b/virtualization/docker.md index b8b307c..080fa4d 100644 --- a/virtualization/docker.md +++ b/virtualization/docker.md @@ -23,3 +23,25 @@ Then run a live image: > docker run -it debian +# Delete + +Check currently running containers with + +> docker ps + +Check all containers with + +> docker ps -a + +Now we can get a list of all containers. + +To delete one, take the id, e.g. '97796727e883', and run: + +> docker rm 97796727e883 + +# Networking + +Get a list of docker container ips + +> docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' *container_name_or_id* +