docker inspect

From wikieduonline
Jump to navigation Jump to search

docker inspect CONTAINER_ID|IMAGE_ID (also available for: container, image, volume, network, node, service, or task)

Restart policy: [1]

  • docker inspect --format '{{json .HostConfig.RestartPolicy}}' CONTAINER_NAME


Volumes and mounts[edit]

  • 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


docker inspect --format "{{ .NetworkSettings.IPAddress }}"

Start contiguration[edit]

Docker inspect example[edit]

Redirecting container logs to syslog[edit]

docker inspect <container_id|container_name> | grep -A 5 LogConfig

"LogConfig": {
  "Type": "syslog"
  "Config": {}


docker inspect grafana | grep -i OOM
           "OOMKilled": false,
           "OomScoreAdj": 0,
           "OomKillDisable": false,

Related commands[edit]

See also[edit]

Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy.

Original Source: