add docker notes

This commit is contained in:
Malin Freeborn 2021-12-30 15:17:09 +00:00
parent 2ea4f2fd52
commit 018152686b

View File

@ -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*