---
title: "List containers"
method: GET
path: "/containers/json"
tags: ["Container"]
---

# List containers

`GET /containers/json`

Returns a list of containers. For details on the format, see [the inspect endpoint](#operation/ContainerInspect).

Note that it uses a different, smaller representation of a container than inspecting a single container. For example,
the list of linked containers is not propagated .

## Query parameters

- `all` boolean
- `limit` integer
- `size` boolean
- `filters` string

## Response `200`

no error

- object[]
  - `Command` string — Command to run when starting the container
  - `Created` integer — When the container was created
  - `HostConfig` object
    - `NetworkMode` string
  - `Id` string — The ID of this container
  - `Image` string — The name of the image used when creating this container
  - `ImageID` string — The ID of the image that this container was created from
  - `Labels` object — User-defined key/value metadata.
  - `Mounts` Mount[]
    - `BindOptions` object — Optional configuration for the `bind` type.
      - `Propagation` 'private' | 'rprivate' | 'shared' | 'rshared' | 'slave' | 'rslave' — A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
    - `Consistency` string — The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`.
    - `ReadOnly` boolean — Whether the mount should be read-only.
    - `Source` string — Mount source (e.g. a volume name, a host path).
    - `Target` string — Container path.
    - `TmpfsOptions` object — Optional configuration for the `tmpfs` type.
      - `Mode` integer — The permission mode for the tmpfs mount in an integer.
      - `SizeBytes` integer — The size for the tmpfs mount in bytes.
    - `Type` 'bind' | 'volume' | 'tmpfs' — The mount type. Available types: - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed. - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs.
    - `VolumeOptions` object — Optional configuration for the `volume` type.
      - `DriverConfig` object — Map of driver specific options
        - `Name` string — Name of the driver to use to create the volume.
        - `Options` object — key/value map of driver specific options.
      - `Labels` object — User-defined key/value metadata.
      - `NoCopy` boolean — Populate volume with data from the target.
  - `Names` string[] — The names that this container has been given
  - `NetworkSettings` object — A summary of the container's network settings
    - `Networks` object
  - `Ports` Port[] — The ports exposed by this container
    - `IP` string, ip-address
    - `PrivatePort` integer, required — Port on the container
    - `PublicPort` integer — Port exposed on the host
    - `Type` 'tcp' | 'udp', required
  - `SizeRootFs` integer — The total size of all the files in this container
  - `SizeRw` integer — The size of files that have been created or changed by this container
  - `State` string — The state of this container (e.g. `Exited`)
  - `Status` string — Additional human-readable status of this container (e.g. `Exit 0`)

## Other responses

- `400` — bad parameter
- `500` — server error

---

[API](https://skmtc.net/docker/apis/engine.md) · [All operations](https://skmtc.net/docker/apis/engine/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/docker/engine/versions/400730735b03/schema)
