Common Commands
Get Container
bash
docker ps
bash
docker ps -a
Inspect Container
bash
docker inspect foo
Get Tail Logs
bash
docker logs --tail 100 xxx
Get Mounts Info
bash
docker inspect foo | grep -A 10 -i mounts
json
"Mounts": [
{
"Type": "bind",
"Source": "xxx",
"Destination": "xxx",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
}
]
Get Volumes
bash
docker volume ls
bash
DRIVER VOLUME NAME
local 0c9658033cba5db4652849467b9ace2ad40e74db5c160fccef0100180f145a13
local 0c82598530ad71b395a903130296f0689ea6b7fcb15a6c00fd8f8bdf2e712731
Get IP Info
bash
docker inspect foo | grep -A 15 Networks
Stats Container
bash
docker stats foo