Docker inspect

From wikieduonline
Revision as of 08:28, 15 July 2020 by Welcome (talk | contribs) (→‎IP)
Jump to navigation Jump to search

Volumes and mounts

  • List of mounts: [2]
docker inspect -f '{{ .Mounts }}' CONTAINER_NAME
docker inspect -f '{{ json .Mounts }}' CONTAINER_NAME | jq .
docker inspect -f '{{ json .Mounts }}' CONTAINER_NAME | python -m json.tool

See also: docker volume inspect

IP

Start contiguration

  • docker inspect -f "{{ .HostConfig.RestartPolicy}}" $(docker ps -a -q)

Docker inspect example

Redirecting container logs to syslog

docker inspect <container_id|container_name> | grep -A 5 LogConfig
"LogConfig": {
  "Type": "syslog"
  "Config": {}
}

Related commands

See also

Advertising: