---
title: "List containers"
method: GET
path: "/containers/json"
---

# List containers

`GET /containers/json`

## Query parameters

- `all` boolean
- `filters` string

## Response `200`

Summary containers that matches the query

- Container[]
  - `Id` string — Container ID
  - `Names` string[]
  - `Image` string
  - `ImageID` string
  - `Command` string
  - `Created` integer — Created time of container in daemon.
  - `SizeRw` integer
  - `SizeRootFs` integer
  - `Labels` object
  - `State` string
  - `Status` string
  - `HostConfig` HostConfig — A container's resources (cgroups config, ulimits, etc)
    - `Binds` string[] — A list of volume bindings for this container. Each volume binding is a string in one of these forms: - `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - `host-src:container-dest:ro` to make the bind mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - `volume-name:container-dest` to bind-mount a volume managed by a volume driver into the container. `container-dest` must be an _absolute_ path. - `volume-name:container-dest:ro` to mount the volume read-only inside the container. `container-dest` must be an _absolute_ path.
    - `ContainerIDFile` string — Path to a file where the container ID is written
    - `LogConfig` LogConfig — The logging configuration for this container
      - `Type` 'json-file' | 'syslog' | 'journald' | 'gelf' | 'fluentd' | 'awslogs' | 'splunk' | 'etwlogs' | 'none'
      - `Config` object
    - `RestartPolicy` RestartPolicy — Define container's restart policy
      - `Name` string
      - `MaximumRetryCount` integer
    - `NetworkMode` string — Network mode to use for this container. Supported standard values are: `netns:<path>`, `bridge`, `host`, `none`, and `container:<name|id>`. Any other value is taken as a custom network's name to which this container should connect to.
    - `PortBindings` PortMap — PortMap describes the mapping of container ports to host ports, using the container's port-number and protocol as key in the format `<port>/<protocol>`, for example, `80/udp`. If a container's port is mapped for both `tcp` and `udp`, two separate entries are added to the mapping table.
    - `AutoRemove` boolean — Automatically remove the container when the container's process exits. This has no effect if `RestartPolicy` is set.
    - `VolumeDriver` string — Driver that this container uses to mount volumes.
    - `VolumesFrom` string[] — A list of volumes to inherit from another container, specified in the form `<container name>[:<ro|rw>]`.
    - `CapAdd` string[] — A list of kernel capabilities to add to the container.
    - `CapDrop` string[] — A list of kernel capabilities to drop from the container.
    - `Dns` string[] — A list of DNS servers for the container to use.
    - `DnsOptions` string[] — A list of DNS options.
    - `DnsSearch` string[] — A list of DNS search domains.
    - `ExtraHosts` string[] — A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. Specified in the form `["hostname:IP"]`.
    - `GroupAdd` string[] — A list of additional groups that the container process will run as.
    - `CgroupMode` string — Determine the container has own cgroup namespace, valid values is host `"host"` means own host cgroup namespace, default or other values will share host cgroup namespace. Note cgroup namespace only take effect for kernel > 4.6
    - `IpcMode` string — IPC sharing mode for the container. Possible values are: - `"none"`: own private IPC namespace, with /dev/shm not mounted - `"private"`: own private IPC namespace - `"shareable"`: own private IPC namespace, with a possibility to share it with other containers - `"container:<name|id>"`: join another (shareable) container's IPC namespace - `"host"`: use the host system's IPC namespace If not specified, daemon default is used, which can either be `"private"` or `"shareable"`, depending on daemon version and configuration.
    - `Cgroup` string — Cgroup to use for the container.
    - `Links` string[] — A list of links for the container in the form `container_name:alias`.
    - `OomScoreAdj` integer — An integer value containing the score given to the container in order to tune OOM killer preferences. The range is in [-1000, 1000].
    - `PidMode` string — Set the PID (Process) Namespace mode for the container. It can be either: - `"container:<name|id>"`: joins another container's PID namespace - `"host"`: use the host's PID namespace inside the container
    - `Privileged` boolean — Gives the container full access to the host.
    - `PublishAllPorts` boolean — Allocates a random host port for all of a container's exposed ports.
    - `ReadonlyRootfs` boolean — Mount the container's root filesystem as read only.
    - `SecurityOpt` string[] — A list of string values to customize labels for MLS systems, such as SELinux.
    - `StorageOpt` object — Storage driver options for this container, in the form `{"size": "120G"}`.
    - `Tmpfs` object — A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options. For example: `{ "/run": "rw,noexec,nosuid,size=65536k" }`.
    - `UTSMode` string — UTS namespace to use for the container.
    - `UsernsMode` string — Sets the usernamespace mode for the container when usernamespace remapping option is enabled.
    - `ShmSize` integer — Size of `/dev/shm` in bytes. If omitted, the system uses 64MB.
    - `Sysctls` object — A list of kernel parameters (sysctls) to set in the container. For example: `{"net.ipv4.ip_forward": "1"}`
    - `Runtime` string — Runtime to use with this container.
    - `RuntimeType` string — The runtime type used in containerd.
    - `ConsoleSize` integer[] — Initial console size, as an `[height, width]` array. (Windows only)
    - `Isolation` 'default' | 'process' | 'hyperv' — Isolation technology of the container. (Windows only)
    - `EnableLxcfs` boolean — Whether to enable lxcfs.
    - `Rich` boolean — Whether to start container in rich container mode. (default false)
    - `RichMode` 'dumb-init' | 'sbin-init' | 'systemd' — Choose one rich container mode.(default dumb-init)
    - `InitScript` string — Initial script executed in container. The script will be executed before entrypoint or command
    - `MaskedPaths` string[] — Masks over the provided paths inside the container.
    - `ReadonlyPaths` string[] — Set the provided paths as RO inside the container.
    - `CgroupParent` string — Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist.
    - `BlkioWeight` integer — Block IO weight (relative weight), need CFQ IO Scheduler enable.
    - `BlkioWeightDevice` WeightDevice[] — Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`.
      - `Path` string — Weight Device
      - `Weight` integer
    - `BlkioDeviceReadBps` ThrottleDevice[] — Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
      - `Path` string — Device path
      - `Rate` integer — Rate
    - `BlkioDeviceWriteBps` ThrottleDevice[] — Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
      - `Path` string — Device path
      - `Rate` integer — Rate
    - `BlkioDeviceReadIOps` ThrottleDevice[] — Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
      - `Path` string — Device path
      - `Rate` integer — Rate
    - `BlkioDeviceWriteIOps` ThrottleDevice[] — Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`.
      - `Path` string — Device path
      - `Rate` integer — Rate
    - `CpuShares` integer — An integer value representing this container's relative CPU weight versus other containers.
    - `CpuPeriod` integer — CPU CFS (Completely Fair Scheduler) period. The length of a CPU period in microseconds.
    - `CpuQuota` integer — CPU CFS (Completely Fair Scheduler) quota. Microseconds of CPU time that the container can get in a CPU period."
    - `CpuRealtimePeriod` integer — The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks.
    - `CpuRealtimeRuntime` integer — The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks.
    - `CpusetCpus` string — CPUs in which to allow execution (e.g., `0-3`, `0,1`)
    - `CpusetMems` string — Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
    - `Devices` DeviceMapping[] — A list of devices to add to the container.
      - `PathOnHost` string — path on host of the device mapping
      - `PathInContainer` string — path in container of the device mapping
      - `CgroupPermissions` string — cgroup permissions of the device
    - `DeviceCgroupRules` string[] — a list of cgroup rules to apply to the container
    - `KernelMemory` integer — Kernel memory limit in bytes.
    - `Memory` integer — Memory limit in bytes.
    - `MemoryReservation` integer — Memory soft limit in bytes.
    - `MemorySwap` integer — Total memory limit (memory + swap). Set as `-1` to enable unlimited swap.
    - `MemorySwappiness` integer — Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. -1 is also accepted, as a legacy alias of 0.
    - `NanoCpus` integer — CPU quota in units of 10<sup>-9</sup> CPUs.
    - `OomKillDisable` boolean, nullable — Disable OOM Killer for the container.
    - `PidsLimit` integer — Tune a container's pids limit. Set -1 for unlimited. Only on Linux 4.4 does this parameter support.
    - `Ulimits` Ulimit[] — A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`"
      - `Name` string — Name of ulimit
      - `Soft` integer — Soft limit
      - `Hard` integer — Hard limit
    - `CpuCount` integer — The number of usable CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last.
    - `CpuPercent` integer — The usable percentage of the available CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last.
    - `IOMaximumIOps` integer — Maximum IOps for the container system drive (Windows only)
    - `IOMaximumBandwidth` integer — Maximum IO in bytes per second for the container system drive (Windows only)
    - `IntelRdtL3Cbm` string — IntelRdtL3Cbm specifies settings for Intel RDT/CAT group that the container is placed into to limit the resources (e.g., L3 cache) the container has available.
    - `ScheLatSwitch` integer — ScheLatSwitch enables scheduler latency count in cpuacct
    - `MemoryWmarkRatio` integer, nullable — MemoryWmarkRatio is an integer value representing this container's memory low water mark percentage. The value of memory low water mark is memory.limit_in_bytes * MemoryWmarkRatio.
    - `MemoryExtra` integer, nullable — MemoryExtra is an integer value representing memory extra in bytes
    - `MemoryForceEmptyCtl` integer — MemoryForceEmptyCtl represents whether to reclaim the page cache when deleting cgroup.
    - `NvidiaConfig` NvidiaConfig
      - `NvidiaVisibleDevices` string — NvidiaVisibleDevices controls which GPUs will be made accessible inside the container
      - `NvidiaDriverCapabilities` string — NvidiaDriverCapabilities controls which driver libraries/binaries will be mounted inside the container
  - `Mounts` MountPoint[] — Set of mount point in a container.
    - `Type` string
    - `ID` string
    - `Name` string
    - `Source` string
    - `Destination` string
    - `Driver` string
    - `Mode` string
    - `RW` boolean
    - `CopyData` boolean
    - `Named` boolean
    - `Replace` string
    - `Propagation` string
  - `NetworkSettings` object
    - `Networks` unknown

## Other responses

- `500` — An unexpected server error occurred.

---

[API](https://skmtc.net/aliyun/apis/pouch-engine-api.md) · [All operations](https://skmtc.net/aliyun/apis/pouch-engine-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aliyun/pouch-engine-api/versions/36d75b2825fc/schema)
