v1

latestSwagger 2.02026-07-175684145.0 KB
Container

Inspect a container

Return low-level information about a container.

get/containers/{id}/json

Path parameters

idstring required

ID or name of the container

Query parameters

sizeboolean

Return the size of container as fields SizeRw and SizeRootFs

Response

no error

Idstring

The ID of the container

Createdstring

The time the container was created

Pathstring

The path to the command being run

Argsstring[]

The arguments to the command being run

Imagestring

The container's image

ResolvConfPathstring

the path of container's resolvConf file on host.

HostnamePathstring

the path of container's hostname file on host.

HostsPathstring

the path of container's hosts file on host.

LogPathstring

the path of container's log file on host.

Namestring

name of the created container.

RestartCountinteger

the container's restart time

Driverstring
MountLabelstring

MountLabel contains the options for the 'mount' command.

ProcessLabelstring
AppArmorProfilestring

AppArmorProfile are specific for AppArmor to Unix platforms

ExecIDsstring[]

exec ids of container

SizeRwinteger nullable

The size of files that have been created or changed by this container.

SizeRootFsinteger nullable

The total size of all the files in this container.

HostRootPathstring

The rootfs path of the container on the host.

Example response

{
  "HostConfig": {
    "PortBindings": {
      "443/tcp": [
        {
          "HostIp": "127.0.0.1",
          "HostPort": "4443"
        }
      ],
      "80/tcp": [
        {
          "HostIp": "0.0.0.0",
          "HostPort": "80"
        },
        {
          "HostIp": "0.0.0.0",
          "HostPort": "8080"
        }
      ],
      "80/udp": [
        {
          "HostIp": "0.0.0.0",
          "HostPort": "80"
        }
      ],
      "2377/tcp": null
    },
    "CpusetCpus": "0-3",
    "Devices": [
      {
        "PathOnHost": "/dev/deviceName",
        "PathInContainer": "/dev/deviceName",
        "CgroupPermissions": "mrw"
      }
    ],
    "DeviceCgroupRules": [
      "c 13:* rwm"
    ],
    "NvidiaConfig": {
      "NvidiaVisibleDevices": "Possible values.\n0,1,2, GPU-fef8089b …: a comma-separated list of GPU UUID(s) or index(es).\nall: all GPUs will be accessible, this is the default value in our container images.\nnone: no GPU will be accessible, but driver capabilities will be enabled.\n",
      "NvidiaDriverCapabilities": "Possible values\ncompute,video, graphics,utility …: a comma-separated list of driver features the container needs.\nall: enable all available driver capabilities.\n"
    }
  },
  "NetworkSettings": {
    "Bridge": "pouch-br",
    "SandboxID": "9d12daf2c33f5959c8bf90aa513e4f65b561738661003029ec84830cd503a0c3",
    "LinkLocalIPv6Address": "fe80::42:acff:fe11:1",
    "Ports": {
      "443/tcp": [
        {
          "HostIp": "127.0.0.1",
          "HostPort": "4443"
        }
      ],
      "80/tcp": [
        {
          "HostIp": "0.0.0.0",
          "HostPort": "80"
        },
        {
          "HostIp": "0.0.0.0",
          "HostPort": "8080"
        }
      ],
      "80/udp": [
        {
          "HostIp": "0.0.0.0",
          "HostPort": "80"
        }
      ],
      "2377/tcp": null
    },
    "SandboxKey": "/var/run/pouch/netns/8ab54b426c38"
  }
}