How do i get information on docker images and docker containers?



  • Man page for docker inspect

    The description in the docker inspect man page says get low level information on docker objects, things like containers, images, networks, volumes, and so on.

    To get information on a docker image.

    $ docker inspect quay.io/coreos/etcd
    

    The info you get back is:

                            
            "Id"
            "RepoTags"
            "RepoDigests"
            "Parent"
            "Comment"
            "Created"
            "Container"
            "ContainerConfig"
                "Hostname"
                "Domainname"
                "User"
                "AttachStdin"
                "AttachStdout"
                "AttachStderr"
                "ExposedPorts"
                "Tty"
                "OpenStdin"
                "StdinOnce"
                "Env"
                "Cmd"
                "ArgsEscaped"
                "Image"
                "Volumes"
                "WorkingDir"
                "Entrypoint"
                "OnBuild"
                "Labels"
            "DockerVersion"
            "Author"
            "Config"
                "Hostname"
                "Domainname"
                "User"
                "AttachStdin"
                "AttachStdout"
                "AttachStderr"
                "ExposedPorts"
                "Tty"
                "OpenStdin"
                "StdinOnce"
                "Env"
                "Cmd"
                "ArgsEscaped"
                "Image"
                "Volumes"
                "WorkingDir"
                "Entrypoint"
                "OnBuild"
                "Labels"
            "Architecture"
            "Os"
            "Size"
            "VirtualSize"
            "GraphDriver"
                "Data"
                    "LowerDir"
                    "MergedDir"
                    "UpperDir"
                    "WorkDir"
                "Name"
            "RootFS"
                "Type"
                "Layers"
            "Metadata"
                "LastTagTime"
    

    You can also inspect docker containers using docker inspect.

    $ docker inspect 3ed9e7af87dd
    

    The type of information you get out inspecting container information is:

            "Id"
            "Created"
            "Path"
            "Args"
            "State"
                "Status"
                "Running"
                "Paused"
                "Restarting"
                "OOMKilled"
                "Dead"
                "Pid"
                "ExitCode"
                "Error"
                "StartedAt"
                "FinishedAt"
            "Image"
            "ResolvConfPath"
            "HostnamePath"
            "HostsPath"
            "LogPath"
            "Name"
            "RestartCount"
            "Driver"
            "Platform"
            "MountLabel"
            "ProcessLabel"
            "AppArmorProfile"
            "ExecIDs"
            "HostConfig"
                "Binds"
                "ContainerIDFile"
                "LogConfig"
                    "Type"
                    "Config"
                },
                "NetworkMode"
                "PortBindings"
                "RestartPolicy"
                    "Name"
                    "MaximumRetryCount"
                },
                "AutoRemove"
                "VolumeDriver"
                "VolumesFrom"
                "CapAdd"
                "CapDrop"
                "Dns"
                "DnsOptions"
                "DnsSearch"
                "ExtraHosts"
                "GroupAdd"
                "IpcMode"
                "Cgroup"
                "Links"
                "OomScoreAdj"
                "PidMode"
                "Privileged"
                "PublishAllPorts"
                "ReadonlyRootfs"
                "SecurityOpt"
                "UTSMode"
                "UsernsMode"
                "ShmSize"
                "Runtime"
                "ConsoleSize"
                "Isolation"
                "CpuShares"
                "Memory"
                "NanoCpus"
                "CgroupParent"
                "BlkioWeight"
                "BlkioWeightDevice"
                "BlkioDeviceReadBps"
                "BlkioDeviceWriteBps"
                "BlkioDeviceReadIOps"
                "BlkioDeviceWriteIOps"
                "CpuPeriod"
                "CpuQuota"
                "CpuRealtimePeriod"
                "CpuRealtimeRuntime"
                "CpusetCpus"
                "CpusetMems"
                "Devices"
                "DeviceCgroupRules"
                "DiskQuota"
                "KernelMemory"
                "MemoryReservation"
                "MemorySwap"
                "MemorySwappiness"
                "OomKillDisable"
                "PidsLimit"
                "Ulimits"
                "CpuCount"
                "CpuPercent"
                "IOMaximumIOps"
                "IOMaximumBandwidth"
                "MaskedPaths"
                "ReadonlyPaths"
            "GraphDriver"
                "Data"
                    "LowerDir"
                    "MergedDir"
                    "UpperDir"
                    "WorkDir"
                "Name"
            "Mounts"
            "Config"
                "Hostname"
                "Domainname"
                "User"
                "AttachStdin"
                "AttachStdout"
                "AttachStderr"
                "Tty"
                "OpenStdin"
                "StdinOnce"
                "Env"
                "Cmd"
                "ArgsEscaped"
                "Image"
                "Volumes"
                "WorkingDir"
                "Entrypoint"
                "OnBuild"
                "Labels"
            "NetworkSettings"
                "Bridge"
                "SandboxID"
                "HairpinMode"
                "LinkLocalIPv6Address"
                "LinkLocalIPv6PrefixLen"
                "Ports"
                "SandboxKey"
                "SecondaryIPAddresses"
                "SecondaryIPv6Addresses"
                "EndpointID"
                "Gateway"
                "GlobalIPv6Address"
                "GlobalIPv6PrefixLen"
                "IPAddress"
                "IPPrefixLen"
                "IPv6Gateway"
                "MacAddress"
                "Networks"
                    "bridge"
                        "IPAMConfig"
                        "Links"
                        "Aliases"
                        "NetworkID"
                        "EndpointID"
                        "Gateway"
                        "IPAddress"
                        "IPPrefixLen"
                        "IPv6Gateway"
                        "GlobalIPv6Address"
                        "GlobalIPv6PrefixLen"
                        "MacAddress"
                        "DriverOpts"
    

Log in to reply
 

© Lightnetics 2024