Linux/Docker/Variables & Snippets
Appearance
List all containers and sort by memory consumption
docker stats --no-stream | tail -n +2 | sort -k 4 -h -r
Docker Host IP
ip -4 route list match 0/0 | cut -d' ' -f3
List all container IPs
docker ps -q | xargs -n 1 docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} {{ .Name }}' | sed 's/ \// /'