Docker

Container management:

Delete all

Delete ALL docker containers and data, use with caution:

docker stop $(docker ps -a -q)
docker system prune -a
docker volume prune
docker network prune

List IP and Hostname

List IP and Hostname of all running containers:

docker ps -q | xargs -n 1 docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} {{ .Name }}' | sed 's/ \// /'
172.17.0.7 oracle-14110-weblogic
172.17.0.6 oracle-12214-weblogic
172.17.0.5 weblogic-vulnhub12213
172.17.0.4 weblogic-vulnhub12213-2018
172.17.0.3 weblogic-vulnhub10360
172.17.0.2 oracle-12213-weblogic

Last updated