Editing Docker inspect
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | |||
<code>[[docker]] inspect [[CONTAINER]]_ID|[[IMAGE_ID]]</code> (also available for: container, image, volume, network, node, service, or task) | <code>[[docker]] inspect [[CONTAINER]]_ID|[[IMAGE_ID]]</code> (also available for: container, image, volume, network, node, service, or task) | ||
* http://manpages.ubuntu.com/manpages/disco/man1/docker-inspect.1.html | * http://manpages.ubuntu.com/manpages/disco/man1/docker-inspect.1.html | ||
Line 5: | Line 4: | ||
− | + | * [[Docker Start configuration behavior and restart policy|Restart policy]]: <ref>https://stackoverflow.com/questions/43108227/is-it-possible-to-show-the-restart-policy-of-a-running-docker-container</ref> | |
− | + | docker inspect --format '{{json .HostConfig.RestartPolicy}}' CONTAINER_NAME | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | [[Docker Start configuration behavior and restart policy|Restart policy]]: <ref>https://stackoverflow.com/questions/43108227/is-it-possible-to-show-the-restart-policy-of-a-running-docker-container</ref> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
== Volumes and mounts == | == Volumes and mounts == | ||
* List of mounts: <ref>https://stackoverflow.com/questions/30133664/how-do-you-list-volumes-in-docker-containers</ref> | * List of mounts: <ref>https://stackoverflow.com/questions/30133664/how-do-you-list-volumes-in-docker-containers</ref> | ||
− | + | <pre>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</pre> | |
See also: <code>[[docker volume inspect]]</code> | See also: <code>[[docker volume inspect]]</code> | ||
== [[IP]] == | == [[IP]] == | ||
− | * <code>[[docker inspect]] CONTAINER_NAME | grep | + | * <code>[[docker inspect]] CONTAINER_NAME | grep IPAddress</code> |
− | |||
− | |||
− | |||
− | == | + | == Start contiguration == |
− | * <code>docker inspect -f "{{ .HostConfig.[[RestartPolicy]]}}" $( | + | * <code>docker inspect -f "{{ .HostConfig.[[RestartPolicy]]}}" $(docker ps -a -q)</code> |
== [[Docker inspect example]] == | == [[Docker inspect example]] == | ||
Line 47: | Line 26: | ||
docker inspect <container_id|container_name> | grep -A 5 LogConfig | docker inspect <container_id|container_name> | grep -A 5 LogConfig | ||
− | + | <pre> | |
− | + | "LogConfig": { | |
− | + | "Type": "syslog" | |
− | + | "Config": {} | |
− | + | } | |
− | + | </pre> | |
− | |||
− | |||
− | |||
− | |||
− | |||
== Related commands == | == Related commands == | ||
Line 63: | Line 37: | ||
* <code>[[docker container inspect]]</code> | * <code>[[docker container inspect]]</code> | ||
* <code>[[docker volume inspect]]</code> | * <code>[[docker volume inspect]]</code> | ||
− | |||
== See also == | == See also == | ||
* {{docker inspect}} | * {{docker inspect}} | ||
− | * {{docker | + | * {{docker}} |
+ | |||
− | [[Category: | + | [[Category:Cloud computing]] |
+ | [[Category:Software development]] | ||
+ | [[Category:Server administration]] | ||
{{CC license}} | {{CC license}} | ||
Original Source: https://en.wikiversity.org/wiki/DevOps/Docker/docker_inspect | Original Source: https://en.wikiversity.org/wiki/DevOps/Docker/docker_inspect |
Advertising: