mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-06 13:41:36 +00:00
docker-inspect: Extend docker inspect to export image/container metadata related to graph driver
Export image/container metadata stored in graph driver. Right now 3 fields DeviceId, DeviceSize and DeviceName are being exported from devicemapper. Other graph drivers can export fields as they see fit. This data can be used to mount the thin device outside of docker and tools can look into image/container and do some kind of inspection. Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
@@ -75,6 +75,11 @@ type Image struct {
|
||||
Labels map[string]string
|
||||
}
|
||||
|
||||
type GraphDriverData struct {
|
||||
Name string
|
||||
Data map[string]string
|
||||
}
|
||||
|
||||
// GET "/images/{name:.*}/json"
|
||||
type ImageInspect struct {
|
||||
Id string
|
||||
@@ -90,6 +95,7 @@ type ImageInspect struct {
|
||||
Os string
|
||||
Size int64
|
||||
VirtualSize int64
|
||||
GraphDriver GraphDriverData
|
||||
}
|
||||
|
||||
// GET "/containers/json"
|
||||
@@ -218,6 +224,7 @@ type ContainerJSONBase struct {
|
||||
AppArmorProfile string
|
||||
ExecIDs []string
|
||||
HostConfig *runconfig.HostConfig
|
||||
GraphDriver GraphDriverData
|
||||
}
|
||||
|
||||
type ContainerJSON struct {
|
||||
|
||||
Reference in New Issue
Block a user