swagger: '2.0' info: title: Docker Engine Config Container API version: '1.54' x-logo: url: https://docs.docker.com/assets/images/logo-docker-main.png description: "The Engine API is an HTTP API served by Docker Engine. It is the API the\nDocker client uses to communicate with the Engine, so everything the Docker\nclient can do can be done with the API.\n\nMost of the client's commands map directly to API endpoints (e.g. `docker ps`\nis `GET /containers/json`). The notable exception is running containers,\nwhich consists of several API calls.\n\n# Errors\n\nThe API uses standard HTTP status codes to indicate the success or failure\nof the API call. The body of the response will be JSON in the following\nformat:\n\n```\n{\n \"message\": \"page not found\"\n}\n```\n\n# Versioning\n\nThe API is usually changed in each release, so API calls are versioned to\nensure that clients don't break. To lock to a specific version of the API,\nyou prefix the URL with its version, for example, call `/v1.30/info` to use\nthe v1.30 version of the `/info` endpoint. If the API version specified in\nthe URL is not supported by the daemon, a HTTP `400 Bad Request` error message\nis returned.\n\nIf you omit the version-prefix, the current version of the API (v1.50) is used.\nFor example, calling `/info` is the same as calling `/v1.52/info`. Using the\nAPI without a version-prefix is deprecated and will be removed in a future release.\n\nEngine releases in the near future should support this version of the API,\nso your client will continue to work even if it is talking to a newer Engine.\n\nThe API uses an open schema model, which means the server may add extra properties\nto responses. Likewise, the server will ignore any extra query parameters and\nrequest body properties. When you write clients, you need to ignore additional\nproperties in responses to ensure they do not break when talking to newer\ndaemons.\n\n\n# Authentication\n\nAuthentication for registries is handled client side. The client has to send\nauthentication details to various endpoints that need to communicate with\nregistries, such as `POST /images/(name)/push`. These are sent as\n`X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5)\n(JSON) string with the following structure:\n\n```\n{\n \"username\": \"string\",\n \"password\": \"string\",\n \"serveraddress\": \"string\"\n}\n```\n\nThe `serveraddress` is a domain/IP without a protocol. Throughout this\nstructure, double quotes are required.\n\nIf you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth),\nyou can just pass this instead of credentials:\n\n```\n{\n \"identitytoken\": \"9cbaf023786cd7...\"\n}\n```\n" basePath: /v1.54 schemes: - http - https consumes: - application/json - text/plain produces: - application/json - text/plain tags: - name: Container x-displayName: Containers description: 'Create and manage containers. ' paths: /containers/json: get: summary: List containers description: '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 . ' operationId: ContainerList produces: - application/json parameters: - name: all in: query description: 'Return all containers. By default, only running containers are shown. ' type: boolean default: false - name: limit in: query description: 'Return this number of most recently created containers, including non-running ones. ' type: integer - name: size in: query description: 'Return the size of container as fields `SizeRw` and `SizeRootFs`. ' type: boolean default: false - name: filters in: query description: 'Filters to process on the container list, encoded as JSON (a `map[string][]string`). For example, `{"status": ["paused"]}` will only return paused containers. Available filters: - `ancestor`=(`[:]`, ``, or ``) - `before`=(`` or ``) - `expose`=(`[/]`|`/[]`) - `exited=` containers with exit code of `` - `health`=(`starting`|`healthy`|`unhealthy`|`none`) - `id=` a container''s ID - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) - `is-task=`(`true`|`false`) - `label=key` or `label="key=value"` of a container label - `name=` a container''s name - `network`=(`` or ``) - `publish`=(`[/]`|`/[]`) - `since`=(`` or ``) - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) - `volume`=(`` or ``) ' type: string responses: 200: description: no error schema: type: array items: $ref: '#/definitions/ContainerSummary' 400: description: bad parameter schema: $ref: '#/definitions/ErrorResponse' 500: description: server error schema: $ref: '#/definitions/ErrorResponse' tags: - Container /containers/create: post: summary: Create a container operationId: ContainerCreate consumes: - application/json - application/octet-stream produces: - application/json parameters: - name: name in: query description: 'Assign the specified name to the container. Must match `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`. ' type: string pattern: ^/?[a-zA-Z0-9][a-zA-Z0-9_.-]+$ - name: platform in: query description: "Platform in the format `os[/arch[/variant]]` used for image lookup.\n\nWhen specified, the daemon checks if the requested image is present\nin the local image cache with the given OS and Architecture, and\notherwise returns a `404` status.\n\nIf the option is not set, the host's native OS and Architecture are\nused to look up the image in the image cache. However, if no platform\nis passed and the given image does exist in the local image cache,\nbut its OS or architecture does not match, the container is created\nwith the available image, and a warning is added to the `Warnings`\nfield in the response, for example;\n\n WARNING: The requested image's platform (linux/arm64/v8) does not\n match the detected host platform (linux/amd64) and no\n specific platform was requested\n" type: string default: '' - name: body in: body description: Container to create schema: allOf: - $ref: '#/definitions/ContainerConfig' - type: object properties: HostConfig: $ref: '#/definitions/HostConfig' NetworkingConfig: $ref: '#/definitions/NetworkingConfig' example: Hostname: '' Domainname: '' User: '' AttachStdin: false AttachStdout: true AttachStderr: true Tty: false OpenStdin: false StdinOnce: false Env: - FOO=bar - BAZ=quux Cmd: - date Entrypoint: '' Image: ubuntu Labels: com.example.vendor: Acme com.example.license: GPL com.example.version: '1.0' Volumes: /volumes/data: {} WorkingDir: '' NetworkDisabled: false ExposedPorts: 22/tcp: {} StopSignal: SIGTERM StopTimeout: 10 HostConfig: Binds: - /tmp:/tmp Links: - redis3:redis Memory: 0 MemorySwap: 0 MemoryReservation: 0 NanoCpus: 500000 CpuPercent: 80 CpuShares: 512 CpuPeriod: 100000 CpuRealtimePeriod: 1000000 CpuRealtimeRuntime: 10000 CpuQuota: 50000 CpusetCpus: 0,1 CpusetMems: 0,1 MaximumIOps: 0 MaximumIOBps: 0 BlkioWeight: 300 BlkioWeightDevice: - {} BlkioDeviceReadBps: - {} BlkioDeviceReadIOps: - {} BlkioDeviceWriteBps: - {} BlkioDeviceWriteIOps: - {} DeviceRequests: - Driver: nvidia Count: -1 DeviceIDs": - '0' - '1' - GPU-fef8089b-4820-abfc-e83e-94318197576e Capabilities: - - gpu - nvidia - compute Options: property1: string property2: string MemorySwappiness: 60 OomKillDisable: false OomScoreAdj: 500 PidMode: '' PidsLimit: 0 PortBindings: 22/tcp: - HostPort: '11022' PublishAllPorts: false Privileged: false ReadonlyRootfs: false Dns: - 8.8.8.8 DnsOptions: - '' DnsSearch: - '' VolumesFrom: - parent - other:ro CapAdd: - NET_ADMIN CapDrop: - MKNOD GroupAdd: - newgroup RestartPolicy: Name: '' MaximumRetryCount: 0 AutoRemove: true NetworkMode: bridge Devices: [] Ulimits: - {} LogConfig: Type: json-file Config: {} SecurityOpt: [] StorageOpt: {} CgroupParent: '' VolumeDriver: '' ShmSize: 67108864 NetworkingConfig: EndpointsConfig: isolated_nw: IPAMConfig: IPv4Address: 172.20.30.33 IPv6Address: 2001:db8:abcd::3033 LinkLocalIPs: - 169.254.34.68 - fe80::3468 Links: - container_1 - container_2 Aliases: - server_x - server_y database_nw: {} required: true responses: 201: description: Container created successfully schema: $ref: '#/definitions/ContainerCreateResponse' 400: description: bad parameter schema: $ref: '#/definitions/ErrorResponse' 404: description: no such image schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'No such image: c2ada9df5af8' 409: description: conflict schema: $ref: '#/definitions/ErrorResponse' 500: description: server error schema: $ref: '#/definitions/ErrorResponse' tags: - Container /containers/{id}/json: get: summary: Inspect a container description: Return low-level information about a container. operationId: ContainerInspect produces: - application/json responses: 200: description: no error schema: $ref: '#/definitions/ContainerInspectResponse' 404: description: no such container schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'No such container: c2ada9df5af8' 500: description: server error schema: $ref: '#/definitions/ErrorResponse' parameters: - name: id in: path required: true description: ID or name of the container type: string - name: size in: query type: boolean default: false description: Return the size of container as fields `SizeRw` and `SizeRootFs` tags: - Container /containers/{id}/top: get: summary: List processes running inside a container description: 'On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows. ' operationId: ContainerTop responses: 200: description: no error schema: $ref: '#/definitions/ContainerTopResponse' 404: description: no such container schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'No such container: c2ada9df5af8' 500: description: server error schema: $ref: '#/definitions/ErrorResponse' parameters: - name: id in: path required: true description: ID or name of the container type: string - name: ps_args in: query description: The arguments to pass to `ps`. For example, `aux` type: string default: -ef tags: - Container /containers/{id}/logs: get: summary: Get container logs description: 'Get `stdout` and `stderr` logs from a container. Note: This endpoint works only for containers with the `json-file` or `journald` logging driver. ' produces: - application/vnd.docker.raw-stream - application/vnd.docker.multiplexed-stream operationId: ContainerLogs responses: 200: description: 'logs returned as a stream in response body. For the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach). Note that unlike the attach endpoint, the logs endpoint does not upgrade the connection and does not set Content-Type. ' schema: type: string format: binary 404: description: no such container schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'No such container: c2ada9df5af8' 500: description: server error schema: $ref: '#/definitions/ErrorResponse' parameters: - name: id in: path required: true description: ID or name of the container type: string - name: follow in: query description: Keep connection after returning logs. type: boolean default: false - name: stdout in: query description: Return logs from `stdout` type: boolean default: false - name: stderr in: query description: Return logs from `stderr` type: boolean default: false - name: since in: query description: Only return logs since this time, as a UNIX timestamp type: integer default: 0 - name: until in: query description: Only return logs before this time, as a UNIX timestamp type: integer default: 0 - name: timestamps in: query description: Add timestamps to every log line type: boolean default: false - name: tail in: query description: 'Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. ' type: string default: all tags: - Container /containers/{id}/changes: get: summary: Get changes on a container’s filesystem description: 'Returns which files in a container''s filesystem have been added, deleted, or modified. The `Kind` of modification can be one of: - `0`: Modified ("C") - `1`: Added ("A") - `2`: Deleted ("D") ' operationId: ContainerChanges produces: - application/json responses: 200: description: The list of changes schema: type: array items: $ref: '#/definitions/FilesystemChange' examples: application/json: - Path: /dev Kind: 0 - Path: /dev/kmsg Kind: 1 - Path: /test Kind: 1 404: description: no such container schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'No such container: c2ada9df5af8' 500: description: server error schema: $ref: '#/definitions/ErrorResponse' parameters: - name: id in: path required: true description: ID or name of the container type: string tags: - Container /containers/{id}/export: get: summary: Export a container description: Export the contents of a container as a tarball. operationId: ContainerExport produces: - application/octet-stream responses: 200: description: no error 404: description: no such container schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'No such container: c2ada9df5af8' 500: description: server error schema: $ref: '#/definitions/ErrorResponse' parameters: - name: id in: path required: true description: ID or name of the container type: string tags: - Container /containers/{id}/stats: get: summary: Get container stats based on resource usage description: 'This endpoint returns a live stream of a container’s resource usage statistics. The `precpu_stats` is the CPU statistic of the *previous* read, and is used to calculate the CPU usage percentage. It is not an exact copy of the `cpu_stats` field. If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is nil then for compatibility with older daemons the length of the corresponding `cpu_usage.percpu_usage` array should be used. On a cgroup v2 host, the following fields are not set * `blkio_stats`: all fields other than `io_service_bytes_recursive` * `cpu_stats`: `cpu_usage.percpu_usage` * `memory_stats`: `max_usage` and `failcnt` Also, `memory_stats.stats` fields are incompatible with cgroup v1. To calculate the values shown by the `stats` command of the docker cli tool the following formulas can be used: * used_memory = `memory_stats.usage - memory_stats.stats.cache` (cgroups v1) * used_memory = `memory_stats.usage - memory_stats.stats.inactive_file` (cgroups v2) * available_memory = `memory_stats.limit` * Memory usage % = `(used_memory / available_memory) * 100.0` * cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage` * system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage` * number_cpus = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` ' operationId: ContainerStats produces: - application/json responses: 200: description: no error schema: $ref: '#/definitions/ContainerStatsResponse' 404: description: no such container schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'No such container: c2ada9df5af8' 500: description: server error schema: $ref: '#/definitions/ErrorResponse' parameters: - name: id in: path required: true description: ID or name of the container type: string - name: stream in: query description: 'Stream the output. If false, the stats will be output once and then it will disconnect. ' type: boolean default: true - name: one-shot in: query description: 'Only get a single stat instead of waiting for 2 cycles. Must be used with `stream=false`. ' type: boolean default: false tags: - Container /containers/{id}/resize: post: summary: Resize a container TTY description: Resize the TTY for a container. operationId: ContainerResize consumes: - application/octet-stream produces: - text/plain responses: 200: description: no error 404: description: no such container schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'No such container: c2ada9df5af8' 500: description: cannot resize container schema: $ref: '#/definitions/ErrorResponse' parameters: - name: id in: path required: true description: ID or name of the container type: string - name: h in: query required: true description: Height of the TTY session in characters type: integer - name: w in: query required: true description: Width of the TTY session in characters type: integer tags: - Container /containers/{id}/start: post: summary: Start a container operationId: ContainerStart responses: 204: description: no error 304: description: container already started 404: description: no such container schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'No such container: c2ada9df5af8' 500: description: server error schema: $ref: '#/definitions/ErrorResponse' parameters: - name: id in: path required: true description: ID or name of the container type: string - name: detachKeys in: query description: 'Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. ' type: string tags: - Container /containers/{id}/stop: post: summary: Stop a container operationId: ContainerStop responses: 204: description: no error 304: description: container already stopped 404: description: no such container schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'No such container: c2ada9df5af8' 500: description: server error schema: $ref: '#/definitions/ErrorResponse' parameters: - name: id in: path required: true description: ID or name of the container type: string - name: signal in: query description: 'Signal to send to the container as an integer or string (e.g. `SIGINT`). ' type: string - name: t in: query description: Number of seconds to wait before killing the container type: integer tags: - Container /containers/{id}/restart: post: summary: Restart a container operationId: ContainerRestart responses: 204: description: no error 404: description: no such container schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'No such container: c2ada9df5af8' 500: description: server error schema: $ref: '#/definitions/ErrorResponse' parameters: - name: id in: path required: true description: ID or name of the container type: string - name: signal in: query description: 'Signal to send to the container as an integer or string (e.g. `SIGINT`). ' type: string - name: t in: query description: Number of seconds to wait before killing the container type: integer tags: - Container /containers/{id}/kill: post: summary: Kill a container description: 'Send a POSIX signal to a container, defaulting to killing to the container. ' operationId: ContainerKill responses: 204: description: no error 404: description: no such container schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'No such container: c2ada9df5af8' 409: description: container is not running schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: Container d37cde0fe4ad63c3a7252023b2f9800282894247d145cb5933ddf6e52cc03a28 is not running 500: description: server error schema: $ref: '#/definitions/ErrorResponse' parameters: - name: id in: path required: true description: ID or name of the container type: string - name: signal in: query description: 'Signal to send to the container as an integer or string (e.g. `SIGINT`). ' type: string default: SIGKILL tags: - Container /containers/{id}/update: post: summary: Update a container description: 'Change various configuration options of a container without having to recreate it. ' operationId: ContainerUpdate consumes: - application/json produces: - application/json responses: 200: description: The container has been updated. schema: $ref: '#/definitions/ContainerUpdateResponse' 404: description: no such container schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'No such container: c2ada9df5af8' 500: description: server error schema: $ref: '#/definitions/ErrorResponse' parameters: - name: id in: path required: true description: ID or name of the container type: string - name: update in: body required: true schema: allOf: - $ref: '#/definitions/Resources' - type: object properties: RestartPolicy: $ref: '#/definitions/RestartPolicy' example: BlkioWeight: 300 CpuShares: 512 CpuPeriod: 100000 CpuQuota: 50000 CpuRealtimePeriod: 1000000 CpuRealtimeRuntime: 10000 CpusetCpus: 0,1 CpusetMems: '0' Memory: 314572800 MemorySwap: 514288000 MemoryReservation: 209715200 RestartPolicy: MaximumRetryCount: 4 Name: on-failure tags: - Container /containers/{id}/rename: post: summary: Rename a container operationId: ContainerRename responses: 204: description: no error 404: description: no such container schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'No such container: c2ada9df5af8' 409: description: name already in use schema: $ref: '#/definitions/ErrorResponse' 500: description: server error schema: $ref: '#/definitions/ErrorResponse' parameters: - name: id in: path required: true description: ID or name of the container type: string - name: name in: query required: true description: New name for the container type: string tags: - Container /containers/{id}/pause: post: summary: Pause a container description: 'Use the freezer cgroup to suspend all processes in a container. Traditionally, when suspending a process the `SIGSTOP` signal is used, which is observable by the process being suspended. With the freezer cgroup the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed. ' operationId: ContainerPause responses: 204: description: no error 404: description: no such container schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'No such container: c2ada9df5af8' 500: description: server error schema: $ref: '#/definitions/ErrorResponse' parameters: - name: id in: path required: true description: ID or name of the container type: string tags: - Container /containers/{id}/unpause: post: summary: Unpause a container description: Resume a container which has been paused. operationId: ContainerUnpause responses: 204: description: no error 404: description: no such container schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'No such container: c2ada9df5af8' 500: description: server error schema: $ref: '#/definitions/ErrorResponse' parameters: - name: id in: path required: true description: ID or name of the container type: string tags: - Container /containers/{id}/attach: post: summary: Attach to a container description: 'Attach to a container to read its output or send it input. You can attach to the same container multiple times and you can reattach to containers that have been detached. Either the `stream` or `logs` parameter must be `true` for this endpoint to do anything. See the [documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) for more details. ### Hijacking This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, and `stderr` on the same socket. This is the response from the daemon for an attach request: ``` HTTP/1.1 200 OK Content-Type: application/vnd.docker.raw-stream [STREAM] ``` After the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server. To hint potential proxies about connection hijacking, the Docker client can also optionally send connection upgrade headers. For example, the client sends this request to upgrade the connection: ``` POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1 Upgrade: tcp Connection: Upgrade ``` The Docker daemon will respond with a `101 UPGRADED` response, and will similarly follow with the raw stream: ``` HTTP/1.1 101 UPGRADED Content-Type: application/vnd.docker.raw-stream Connection: Upgrade Upgrade: tcp [STREAM] ``` ### Stream format When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), the HTTP Content-Type header is set to application/vnd.docker.multiplexed-stream and the stream over the hijacked connected is multiplexed to separate out `stdout` and `stderr`. The stream consists of a series of frames, each containing a header and a payload. The header contains the information which the stream writes (`stdout` or `stderr`). It also contains the size of the associated frame encoded in the last four bytes (`uint32`). It is encoded on the first eight bytes like this: ```go header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4} ``` `STREAM_TYPE` can be: - 0: `stdin` (is written on `stdout`) - 1: `stdout` - 2: `stderr` `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size encoded as big endian. Following the header is the payload, which is the specified number of bytes of `STREAM_TYPE`. The simplest way to implement this protocol is the following: 1. Read 8 bytes. 2. Choose `stdout` or `stderr` depending on the first byte. 3. Extract the frame size from the last four bytes. 4. Read the extracted size and output it on the correct output. 5. Goto 1. ### Stream format when using a TTY When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), the stream is not multiplexed. The data exchanged over the hijacked connection is simply the raw data from the process PTY and client''s `stdin`. ' operationId: ContainerAttach produces: - application/vnd.docker.raw-stream - application/vnd.docker.multiplexed-stream responses: 101: description: no error, hints proxy about hijacking 200: description: no error, no upgrade header found 400: description: bad parameter schema: $ref: '#/definitions/ErrorResponse' 404: description: no such container schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'No such container: c2ada9df5af8' 500: description: server error schema: $ref: '#/definitions/ErrorResponse' parameters: - name: id in: path required: true description: ID or name of the container type: string - name: detachKeys in: query description: 'Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. ' type: string - name: logs in: query description: 'Replay previous logs from the container. This is useful for attaching to a container that has started and you want to output everything since the container started. If `stream` is also enabled, once all the previous output has been returned, it will seamlessly transition into streaming current output. ' type: boolean default: false - name: stream in: query description: 'Stream attached streams from the time the request was made onwards. ' type: boolean default: false - name: stdin in: query description: Attach to `stdin` type: boolean default: false - name: stdout in: query description: Attach to `stdout` type: boolean default: false - name: stderr in: query description: Attach to `stderr` type: boolean default: false tags: - Container /containers/{id}/attach/ws: get: summary: Attach to a container via a websocket operationId: ContainerAttachWebsocket responses: 101: description: no error, hints proxy about hijacking 200: description: no error, no upgrade header found 400: description: bad parameter schema: $ref: '#/definitions/ErrorResponse' 404: description: no such container schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'No such container: c2ada9df5af8' 500: description: server error schema: $ref: '#/definitions/ErrorResponse' parameters: - name: id in: path required: true description: ID or name of the container type: string - name: detachKeys in: query description: 'Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,`, or `_`. ' type: string - name: logs in: query description: Return logs type: boolean default: false - name: stream in: query description: Return stream type: boolean default: false - name: stdin in: query description: Attach to `stdin` type: boolean default: false - name: stdout in: query description: Attach to `stdout` type: boolean default: false - name: stderr in: query description: Attach to `stderr` type: boolean default: false tags: - Container /containers/{id}/wait: post: summary: Wait for a container description: Block until a container stops, then returns the exit code. operationId: ContainerWait produces: - application/json responses: 200: description: The container has exit. schema: $ref: '#/definitions/ContainerWaitResponse' 400: description: bad parameter schema: $ref: '#/definitions/ErrorResponse' 404: description: no such container schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'No such container: c2ada9df5af8' 500: description: server error schema: $ref: '#/definitions/ErrorResponse' parameters: - name: id in: path required: true description: ID or name of the container type: string - name: condition in: query description: 'Wait until a container state reaches the given condition. Defaults to `not-running` if omitted or empty. ' type: string enum: - not-running - next-exit - removed default: not-running tags: - Container /containers/{id}: delete: summary: Remove a container operationId: ContainerDelete responses: 204: description: no error 400: description: bad parameter schema: $ref: '#/definitions/ErrorResponse' 404: description: no such container schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'No such container: c2ada9df5af8' 409: description: conflict schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'You cannot remove a running container: c2ada9df5af8. Stop the container before attempting removal or force remove ' 500: description: server error schema: $ref: '#/definitions/ErrorResponse' parameters: - name: id in: path required: true description: ID or name of the container type: string - name: v in: query description: Remove anonymous volumes associated with the container. type: boolean default: false - name: force in: query description: If the container is running, kill it before removing it. type: boolean default: false - name: link in: query description: Remove the specified link associated with the container. type: boolean default: false tags: - Container /containers/{id}/archive: head: summary: Get information about files in a container description: 'A response header `X-Docker-Container-Path-Stat` is returned, containing a base64 - encoded JSON object with some filesystem header information about the path. ' operationId: ContainerArchiveInfo responses: 200: description: no error headers: X-Docker-Container-Path-Stat: type: string description: 'A base64 - encoded JSON object with some filesystem header information about the path ' 400: description: Bad parameter schema: $ref: '#/definitions/ErrorResponse' 404: description: Container or path does not exist schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'No such container: c2ada9df5af8' 500: description: Server error schema: $ref: '#/definitions/ErrorResponse' parameters: - name: id in: path required: true description: ID or name of the container type: string - name: path in: query required: true description: Resource in the container’s filesystem to archive. type: string tags: - Container get: summary: Get an archive of a filesystem resource in a container description: Get a tar archive of a resource in the filesystem of container id. operationId: ContainerArchive produces: - application/x-tar responses: 200: description: no error 400: description: Bad parameter schema: $ref: '#/definitions/ErrorResponse' 404: description: Container or path does not exist schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'No such container: c2ada9df5af8' 500: description: server error schema: $ref: '#/definitions/ErrorResponse' parameters: - name: id in: path required: true description: ID or name of the container type: string - name: path in: query required: true description: Resource in the container’s filesystem to archive. type: string tags: - Container put: summary: Extract an archive of files or folders to a directory in a container description: 'Upload a tar archive to be extracted to a path in the filesystem of container id. `path` parameter is asserted to be a directory. If it exists as a file, 400 error will be returned with message "not a directory". ' operationId: PutContainerArchive consumes: - application/x-tar - application/octet-stream responses: 200: description: The content was extracted successfully 400: description: Bad parameter schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: not a directory 403: description: Permission denied, the volume or container rootfs is marked as read-only. schema: $ref: '#/definitions/ErrorResponse' 404: description: No such container or path does not exist inside the container schema: $ref: '#/definitions/ErrorResponse' examples: application/json: message: 'No such container: c2ada9df5af8' 500: description: Server error schema: $ref: '#/definitions/ErrorResponse' parameters: - name: id in: path required: true description: ID or name of the container type: string - name: path in: query required: true description: 'Path to a directory in the container to extract the archive’s contents into. ' type: string - name: noOverwriteDirNonDir in: query description: 'If `1`, `true`, or `True` then it will be an error if unpacking the given content would cause an existing directory to be replaced with a non-directory and vice versa. ' type: string - name: copyUIDGID in: query description: 'If `1`, `true`, then it will copy UID/GID maps to the dest file or dir ' type: string - name: inputStream in: body required: true description: 'The input stream must be a tar archive compressed with one of the following algorithms: `identity` (no compression), `gzip`, `bzip2`, or `xz`. ' schema: type: string format: binary tags: - Container /containers/prune: post: summary: Delete stopped containers produces: - application/json operationId: ContainerPrune parameters: - name: filters in: query description: 'Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: - `until=` Prune containers created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune containers with (or without, in case `label!=...` is used) the specified labels. ' type: string responses: 200: description: No error schema: type: object title: ContainerPruneResponse properties: ContainersDeleted: description: Container IDs that were deleted type: array items: type: string SpaceReclaimed: description: Disk space reclaimed in bytes type: integer format: int64 500: description: Server error schema: $ref: '#/definitions/ErrorResponse' tags: - Container definitions: NetworkingConfig: description: 'NetworkingConfig represents the container''s networking configuration for each of its interfaces. It is used for the networking configs specified in the `docker create` and `docker network connect` commands. ' type: object properties: EndpointsConfig: description: 'A mapping of network name to endpoint configuration for that network. The endpoint configuration can be left empty to connect to that network with no particular endpoint configuration. ' type: object additionalProperties: $ref: '#/definitions/EndpointSettings' example: EndpointsConfig: isolated_nw: IPAMConfig: IPv4Address: 172.20.30.33 IPv6Address: 2001:db8:abcd::3033 LinkLocalIPs: - 169.254.34.68 - fe80::3468 MacAddress: 02:42:ac:12:05:02 Links: - container_1 - container_2 Aliases: - server_x - server_y database_nw: {} ContainerPidsStats: description: 'PidsStats contains Linux-specific stats of a container''s process-IDs (PIDs). This type is Linux-specific and omitted for Windows containers. ' type: object x-go-name: PidsStats x-nullable: true properties: current: description: 'Current is the number of PIDs in the cgroup. ' type: integer format: uint64 x-nullable: true example: 5 limit: description: 'Limit is the hard limit on the number of pids in the cgroup. A "Limit" of 0 means that there is no limit. ' type: integer format: uint64 x-nullable: true example: '18446744073709551615' ContainerCPUStats: description: 'CPU related info of the container ' type: object x-go-name: CPUStats x-nullable: true properties: cpu_usage: $ref: '#/definitions/ContainerCPUUsage' system_cpu_usage: description: 'System Usage. This field is Linux-specific and omitted for Windows containers. ' type: integer format: uint64 x-nullable: true example: 5 online_cpus: description: 'Number of online CPUs. This field is Linux-specific and omitted for Windows containers. ' type: integer format: uint32 x-nullable: true example: 5 throttling_data: $ref: '#/definitions/ContainerThrottlingData' ContainerUpdateResponse: type: object title: ContainerUpdateResponse x-go-name: UpdateResponse description: Response for a successful container-update. properties: Warnings: type: array description: Warnings encountered when updating the container. items: type: string example: - Published ports are discarded when using host network mode PortMap: description: 'PortMap describes the mapping of container ports to host ports, using the container''s port-number and protocol as key in the format `/`, for example, `80/udp`. If a container''s port is mapped for multiple protocols, separate entries are added to the mapping table. ' type: object additionalProperties: type: array x-nullable: true items: $ref: '#/definitions/PortBinding' example: 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' 53/udp: - HostIp: 0.0.0.0 HostPort: '53' 2377/tcp: null DriverData: description: 'Information about the storage driver used to store the container''s and image''s filesystem. ' type: object required: - Name - Data properties: Name: description: Name of the storage driver. type: string x-nullable: false example: overlay2 Data: description: 'Low-level storage metadata, provided as key/value pairs. This information is driver-specific, and depends on the storage-driver in use, and should be used for informational purposes only. ' type: object x-nullable: false additionalProperties: type: string example: MergedDir: /var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/merged UpperDir: /var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/diff WorkDir: /var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/work ChangeType: description: 'Kind of change Can be one of: - `0`: Modified ("C") - `1`: Added ("A") - `2`: Deleted ("D") ' type: integer format: uint8 enum: - 0 - 1 - 2 x-nullable: false ContainerCPUUsage: description: 'All CPU stats aggregated since container inception. ' type: object x-go-name: CPUUsage x-nullable: true properties: total_usage: description: 'Total CPU time consumed in nanoseconds (Linux) or 100''s of nanoseconds (Windows). ' type: integer format: uint64 example: 29912000 percpu_usage: description: 'Total CPU time (in nanoseconds) consumed per core (Linux). This field is Linux-specific when using cgroups v1. It is omitted when using cgroups v2 and Windows containers. ' type: array x-nullable: true items: type: integer format: uint64 example: 29912000 usage_in_kernelmode: description: 'Time (in nanoseconds) spent by tasks of the cgroup in kernel mode (Linux), or time spent (in 100''s of nanoseconds) by all container processes in kernel mode (Windows). Not populated for Windows containers using Hyper-V isolation. ' type: integer format: uint64 example: 21994000 usage_in_usermode: description: 'Time (in nanoseconds) spent by tasks of the cgroup in user mode (Linux), or time spent (in 100''s of nanoseconds) by all container processes in kernel mode (Windows). Not populated for Windows containers using Hyper-V isolation. ' type: integer format: uint64 example: 7918000 HealthConfig: description: 'A test to perform to check that the container is healthy. Healthcheck commands should be side-effect free. ' type: object properties: Test: description: 'The test to perform. Possible values are: - `[]` inherit healthcheck from image or parent image - `["NONE"]` disable healthcheck - `["CMD", args...]` exec arguments directly - `["CMD-SHELL", command]` run command with system''s default shell A non-zero exit code indicates a failed healthcheck: - `0` healthy - `1` unhealthy - `2` reserved (treated as unhealthy) - other values: error running probe ' type: array items: type: string Interval: description: 'The time to wait between checks in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit. ' type: integer format: int64 Timeout: description: 'The time to wait before considering the check to have hung. It should be 0 or at least 1000000 (1 ms). 0 means inherit. If the health check command does not complete within this timeout, the check is considered failed and the health check process is forcibly terminated without a graceful shutdown. ' type: integer format: int64 Retries: description: 'The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit. ' type: integer StartPeriod: description: 'Start period for the container to initialize before starting health-retries countdown in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit. ' type: integer format: int64 StartInterval: description: 'The time to wait between checks in nanoseconds during the start period. It should be 0 or at least 1000000 (1 ms). 0 means inherit. ' type: integer format: int64 OCIDescriptor: type: object x-go-name: Descriptor description: 'A descriptor struct containing digest, media type, and size, as defined in the [OCI Content Descriptors Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md). ' properties: mediaType: description: 'The media type of the object this schema refers to. ' type: string example: application/vnd.oci.image.manifest.v1+json digest: description: 'The digest of the targeted content. ' type: string example: sha256:c0537ff6a5218ef531ece93d4984efc99bbf3f7497c0a7726c88e2bb7584dc96 size: description: 'The size in bytes of the blob. ' type: integer format: int64 example: 424 urls: description: List of URLs from which this object MAY be downloaded. type: array items: type: string format: uri x-nullable: true annotations: description: Arbitrary metadata relating to the targeted content. type: object x-nullable: true additionalProperties: type: string example: com.docker.official-images.bashbrew.arch: amd64 org.opencontainers.image.base.digest: sha256:0d0ef5c914d3ea700147da1bd050c59edb8bb12ca312f3800b29d7c8087eabd8 org.opencontainers.image.base.name: scratch org.opencontainers.image.created: '2025-01-27T00:00:00Z' org.opencontainers.image.revision: 9fabb4bad5138435b01857e2fe9363e2dc5f6a79 org.opencontainers.image.source: https://git.launchpad.net/cloud-images/+oci/ubuntu-base org.opencontainers.image.url: https://hub.docker.com/_/ubuntu org.opencontainers.image.version: '24.04' data: type: string x-nullable: true description: 'Data is an embedding of the targeted content. This is encoded as a base64 string when marshalled to JSON (automatically, by encoding/json). If present, Data can be used directly to avoid fetching the targeted content.' example: null platform: $ref: '#/definitions/OCIPlatform' artifactType: description: ArtifactType is the IANA media type of this artifact. type: string x-nullable: true example: null DeviceRequest: type: object description: A request for devices to be sent to device drivers properties: Driver: description: 'The name of the device driver to use for this request. Note that if this is specified the capabilities are ignored when selecting a device driver. ' type: string example: nvidia Count: type: integer example: -1 DeviceIDs: type: array items: type: string example: - '0' - '1' - GPU-fef8089b-4820-abfc-e83e-94318197576e Capabilities: description: 'A list of capabilities; an OR list of AND lists of capabilities. Note that if a driver is specified the capabilities have no effect on selecting a driver as the driver name is used directly. Note that if no driver is specified the capabilities are used to select a driver with the required capabilities. ' type: array items: type: array items: type: string example: - - gpu - nvidia - compute Options: description: 'Driver-specific options, specified as a key/value pairs. These options are passed directly to the driver. ' type: object additionalProperties: type: string RestartPolicy: description: 'The behavior to apply when the container exits. The default is not to restart. An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server. ' type: object properties: Name: type: string description: '- Empty string means not to restart - `no` Do not automatically restart - `always` Always restart - `unless-stopped` Restart always except when the user has manually stopped the container - `on-failure` Restart only when the container exit code is non-zero ' enum: - '' - 'no' - always - unless-stopped - on-failure MaximumRetryCount: type: integer description: 'If `on-failure` is used, the number of times to retry before giving up. ' Resources: description: A container's resources (cgroups config, ulimits, etc) type: object properties: CpuShares: description: 'An integer value representing this container''s relative CPU weight versus other containers. ' type: integer Memory: description: Memory limit in bytes. type: integer format: int64 default: 0 CgroupParent: description: '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. ' type: string BlkioWeight: description: Block IO weight (relative weight). type: integer minimum: 0 maximum: 1000 BlkioWeightDevice: description: 'Block IO weight (relative device weight) in the form: ``` [{"Path": "device_path", "Weight": weight}] ``` ' type: array items: type: object properties: Path: type: string Weight: type: integer minimum: 0 BlkioDeviceReadBps: description: 'Limit read rate (bytes per second) from a device, in the form: ``` [{"Path": "device_path", "Rate": rate}] ``` ' type: array items: $ref: '#/definitions/ThrottleDevice' BlkioDeviceWriteBps: description: 'Limit write rate (bytes per second) to a device, in the form: ``` [{"Path": "device_path", "Rate": rate}] ``` ' type: array items: $ref: '#/definitions/ThrottleDevice' BlkioDeviceReadIOps: description: 'Limit read rate (IO per second) from a device, in the form: ``` [{"Path": "device_path", "Rate": rate}] ``` ' type: array items: $ref: '#/definitions/ThrottleDevice' BlkioDeviceWriteIOps: description: 'Limit write rate (IO per second) to a device, in the form: ``` [{"Path": "device_path", "Rate": rate}] ``` ' type: array items: $ref: '#/definitions/ThrottleDevice' CpuPeriod: description: The length of a CPU period in microseconds. type: integer format: int64 CpuQuota: description: 'Microseconds of CPU time that the container can get in a CPU period. ' type: integer format: int64 CpuRealtimePeriod: description: 'The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. ' type: integer format: int64 CpuRealtimeRuntime: description: 'The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. ' type: integer format: int64 CpusetCpus: description: 'CPUs in which to allow execution (e.g., `0-3`, `0,1`). ' type: string example: 0-3 CpusetMems: description: 'Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. ' type: string Devices: description: A list of devices to add to the container. type: array items: $ref: '#/definitions/DeviceMapping' DeviceCgroupRules: description: a list of cgroup rules to apply to the container type: array items: type: string example: c 13:* rwm DeviceRequests: description: 'A list of requests for devices to be sent to device drivers. ' type: array items: $ref: '#/definitions/DeviceRequest' MemoryReservation: description: Memory soft limit in bytes. type: integer format: int64 MemorySwap: description: 'Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. ' type: integer format: int64 MemorySwappiness: description: 'Tune a container''s memory swappiness behavior. Accepts an integer between 0 and 100. ' type: integer format: int64 minimum: 0 maximum: 100 NanoCpus: description: CPU quota in units of 10-9 CPUs. type: integer format: int64 OomKillDisable: description: Disable OOM Killer for the container. type: boolean Init: description: 'Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used. ' type: boolean x-nullable: true PidsLimit: description: 'Tune a container''s PIDs limit. Set `0` or `-1` for unlimited, or `null` to not change. ' type: integer format: int64 x-nullable: true Ulimits: description: 'A list of resource limits to set in the container. For example: ``` {"Name": "nofile", "Soft": 1024, "Hard": 2048} ``` ' type: array items: type: object properties: Name: description: Name of ulimit type: string Soft: description: Soft limit type: integer Hard: description: Hard limit type: integer CpuCount: description: '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. ' type: integer format: int64 CpuPercent: description: '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. ' type: integer format: int64 IOMaximumIOps: description: Maximum IOps for the container system drive (Windows only) type: integer format: int64 IOMaximumBandwidth: description: 'Maximum IO in bytes per second for the container system drive (Windows only). ' type: integer format: int64 ContainerStorageStats: description: 'StorageStats is the disk I/O stats for read/write on Windows. This type is Windows-specific and omitted for Linux containers. ' type: object x-go-name: StorageStats x-nullable: true properties: read_count_normalized: type: integer format: uint64 x-nullable: true example: 7593984 read_size_bytes: type: integer format: uint64 x-nullable: true example: 7593984 write_count_normalized: type: integer format: uint64 x-nullable: true example: 7593984 write_size_bytes: type: integer format: uint64 x-nullable: true example: 7593984 HealthcheckResult: description: 'HealthcheckResult stores information about a single run of a healthcheck probe ' type: object x-nullable: true properties: Start: description: 'Date and time at which this check started in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. ' type: string format: date-time example: '2020-01-04T10:44:24.496525531Z' End: description: 'Date and time at which this check ended in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. ' type: string format: dateTime example: '2020-01-04T10:45:21.364524523Z' ExitCode: description: 'ExitCode meanings: - `0` healthy - `1` unhealthy - `2` reserved (considered unhealthy) - other values: error running probe ' type: integer example: 0 Output: description: Output from last check type: string ContainerCreateResponse: description: OK response to ContainerCreate operation type: object title: ContainerCreateResponse x-go-name: CreateResponse required: - Id - Warnings properties: Id: description: The ID of the created container type: string x-nullable: false example: ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743 Warnings: description: Warnings encountered when creating the container type: array x-nullable: false items: type: string example: [] ContainerStatsResponse: description: 'Statistics sample for a container. ' type: object x-go-name: StatsResponse title: ContainerStatsResponse properties: id: description: 'ID of the container for which the stats were collected. ' type: string x-nullable: true example: ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743 name: description: 'Name of the container for which the stats were collected. ' type: string x-nullable: true example: boring_wozniak os_type: description: 'OSType is the OS of the container ("linux" or "windows") to allow platform-specific handling of stats. ' type: string x-nullable: true example: linux read: description: 'Date and time at which this sample was collected. The value is formatted as [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) with nano-seconds. ' type: string format: date-time example: '2025-01-16T13:55:22.165243637Z' cpu_stats: $ref: '#/definitions/ContainerCPUStats' memory_stats: $ref: '#/definitions/ContainerMemoryStats' networks: description: 'Network statistics for the container per interface. This field is omitted if the container has no networking enabled. ' x-nullable: true additionalProperties: $ref: '#/definitions/ContainerNetworkStats' example: eth0: rx_bytes: 5338 rx_dropped: 0 rx_errors: 0 rx_packets: 36 tx_bytes: 648 tx_dropped: 0 tx_errors: 0 tx_packets: 8 eth5: rx_bytes: 4641 rx_dropped: 0 rx_errors: 0 rx_packets: 26 tx_bytes: 690 tx_dropped: 0 tx_errors: 0 tx_packets: 9 pids_stats: $ref: '#/definitions/ContainerPidsStats' blkio_stats: $ref: '#/definitions/ContainerBlkioStats' num_procs: description: 'The number of processors on the system. This field is Windows-specific and always zero for Linux containers. ' type: integer format: uint32 example: 16 storage_stats: $ref: '#/definitions/ContainerStorageStats' preread: description: 'Date and time at which this first sample was collected. This field is not propagated if the "one-shot" option is set. If the "one-shot" option is set, this field may be omitted, empty, or set to a default date (`0001-01-01T00:00:00Z`). The value is formatted as [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) with nano-seconds. ' type: string format: date-time example: '2025-01-16T13:55:21.160452595Z' precpu_stats: $ref: '#/definitions/ContainerCPUStats' HostConfig: description: Container configuration that depends on the host we are running on allOf: - $ref: '#/definitions/Resources' - type: object properties: Binds: type: array description: "A list of volume bindings for this container. Each volume binding\nis a string in one of these forms:\n\n- `host-src:container-dest[:options]` to bind-mount a host path\n into the container. Both `host-src`, and `container-dest` must\n be an _absolute_ path.\n- `volume-name:container-dest[:options]` to bind-mount a volume\n managed by a volume driver into the container. `container-dest`\n must be an _absolute_ path.\n\n`options` is an optional, comma-delimited list of:\n\n- `nocopy` disables automatic copying of data from the container\n path to the volume. The `nocopy` flag only applies to named volumes.\n- `[ro|rw]` mounts a volume read-only or read-write, respectively.\n If omitted or set to `rw`, volumes are mounted read-write.\n- `[z|Z]` applies SELinux labels to allow or deny multiple containers\n to read and write to the same volume.\n - `z`: a _shared_ content label is applied to the content. This\n label indicates that multiple containers can share the volume\n content, for both reading and writing.\n - `Z`: a _private unshared_ label is applied to the content.\n This label indicates that only the current container can use\n a private volume. Labeling systems such as SELinux require\n proper labels to be placed on volume content that is mounted\n into a container. Without a label, the security system can\n prevent a container's processes from using the content. By\n default, the labels set by the host operating system are not\n modified.\n- `[[r]shared|[r]slave|[r]private]` specifies mount\n [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt).\n This only applies to bind-mounted volumes, not internal volumes\n or named volumes. Mount propagation requires the source mount\n point (the location where the source directory is mounted in the\n host operating system) to have the correct propagation properties.\n For shared volumes, the source mount point must be set to `shared`.\n For slave volumes, the mount must be set to either `shared` or\n `slave`.\n" items: type: string ContainerIDFile: type: string description: Path to a file where the container ID is written example: '' LogConfig: type: object description: The logging configuration for this container properties: Type: description: 'Name of the logging driver used for the container or "none" if logging is disabled.' type: string enum: - local - json-file - syslog - journald - gelf - fluentd - awslogs - splunk - etwlogs - none Config: description: Driver-specific configuration options for the logging driver. type: object additionalProperties: type: string example: max-file: '5' max-size: 10m NetworkMode: type: string description: 'Network mode to use for this container. Supported standard values are: `bridge`, `host`, `none`, and `container:`. Any other value is taken as a custom network''s name to which this container should connect to. ' PortBindings: $ref: '#/definitions/PortMap' RestartPolicy: $ref: '#/definitions/RestartPolicy' AutoRemove: type: boolean description: 'Automatically remove the container when the container''s process exits. This has no effect if `RestartPolicy` is set. ' VolumeDriver: type: string description: Driver that this container uses to mount volumes. VolumesFrom: type: array description: 'A list of volumes to inherit from another container, specified in the form `[:]`. ' items: type: string Mounts: description: 'Specification for mounts to be added to the container. ' type: array items: $ref: '#/definitions/Mount' ConsoleSize: type: array description: 'Initial console size, as an `[height, width]` array. ' x-nullable: true minItems: 2 maxItems: 2 items: type: integer minimum: 0 example: - 80 - 64 Annotations: type: object description: 'Arbitrary non-identifying metadata attached to container and provided to the runtime when the container is started. ' additionalProperties: type: string CapAdd: type: array description: 'A list of kernel capabilities to add to the container. Conflicts with option ''Capabilities''. ' items: type: string CapDrop: type: array description: 'A list of kernel capabilities to drop from the container. Conflicts with option ''Capabilities''. ' items: type: string CgroupnsMode: type: string enum: - private - host description: 'cgroup namespace mode for the container. Possible values are: - `"private"`: the container runs in its own private cgroup namespace - `"host"`: use the host system''s cgroup namespace If not specified, the daemon default is used, which can either be `"private"` or `"host"`, depending on daemon version, kernel support and configuration. ' Dns: type: array description: A list of DNS servers for the container to use. items: type: string format: ip-address x-go-type: type: Addr import: package: net/netip DnsOptions: type: array description: A list of DNS options. items: type: string DnsSearch: type: array description: A list of DNS search domains. items: type: string ExtraHosts: type: array description: 'A list of hostnames/IP mappings to add to the container''s `/etc/hosts` file. Specified in the form `["hostname:IP"]`. ' items: type: string GroupAdd: type: array description: 'A list of additional groups that the container process will run as. ' items: type: string IpcMode: type: string description: '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:"`: 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: type: string description: Cgroup to use for the container. Links: type: array description: 'A list of links for the container in the form `container_name:alias`. ' items: type: string OomScoreAdj: type: integer description: 'An integer value containing the score given to the container in order to tune OOM killer preferences. ' example: 500 PidMode: type: string description: 'Set the PID (Process) Namespace mode for the container. It can be either: - `"container:"`: joins another container''s PID namespace - `"host"`: use the host''s PID namespace inside the container ' Privileged: type: boolean description: Gives the container full access to the host. PublishAllPorts: type: boolean description: 'Allocates an ephemeral host port for all of a container''s exposed ports. Ports are de-allocated when the container stops and allocated when the container starts. The allocated port might be changed when restarting the container. The port is selected from the ephemeral port range that depends on the kernel. For example, on Linux the range is defined by `/proc/sys/net/ipv4/ip_local_port_range`. ' ReadonlyRootfs: type: boolean description: Mount the container's root filesystem as read only. SecurityOpt: type: array description: 'A list of string values to customize labels for MLS systems, such as SELinux. ' items: type: string StorageOpt: type: object description: 'Storage driver options for this container, in the form `{"size": "120G"}`. ' additionalProperties: type: string Tmpfs: type: object description: '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" } ``` ' additionalProperties: type: string UTSMode: type: string description: UTS namespace to use for the container. UsernsMode: type: string description: 'Sets the usernamespace mode for the container when usernamespace remapping option is enabled. ' ShmSize: type: integer format: int64 description: 'Size of `/dev/shm` in bytes. If omitted, the system uses 64MB. ' minimum: 0 Sysctls: type: object x-nullable: true description: 'A list of kernel parameters (sysctls) to set in the container. This field is omitted if not set.' additionalProperties: type: string example: net.ipv4.ip_forward: '1' Runtime: type: string x-nullable: true description: Runtime to use with this container. Isolation: type: string description: 'Isolation technology of the container. (Windows only) ' enum: - default - process - hyperv - '' MaskedPaths: type: array description: 'The list of paths to be masked inside the container (this overrides the default set of paths). ' items: type: string example: - /proc/asound - /proc/acpi - /proc/kcore - /proc/keys - /proc/latency_stats - /proc/timer_list - /proc/timer_stats - /proc/sched_debug - /proc/scsi - /sys/firmware - /sys/devices/virtual/powercap ReadonlyPaths: type: array description: 'The list of paths to be set as read-only inside the container (this overrides the default set of paths). ' items: type: string example: - /proc/bus - /proc/fs - /proc/irq - /proc/sys - /proc/sysrq-trigger ThrottleDevice: type: object properties: Path: description: Device path type: string Rate: description: Rate type: integer format: int64 minimum: 0 FilesystemChange: description: 'Change in the container''s filesystem. ' type: object required: - Path - Kind properties: Path: description: 'Path to file or directory that has changed. ' type: string x-nullable: false Kind: $ref: '#/definitions/ChangeType' ContainerBlkioStats: description: 'BlkioStats stores all IO service stats for data read and write. This type is Linux-specific and holds many fields that are specific to cgroups v1. On a cgroup v2 host, all fields other than `io_service_bytes_recursive` are omitted or `null`. This type is only populated on Linux and omitted for Windows containers. ' type: object x-go-name: BlkioStats x-nullable: true properties: io_service_bytes_recursive: type: array items: $ref: '#/definitions/ContainerBlkioStatEntry' io_serviced_recursive: description: 'This field is only available when using Linux containers with cgroups v1. It is omitted or `null` when using cgroups v2. ' x-nullable: true type: array items: $ref: '#/definitions/ContainerBlkioStatEntry' io_queue_recursive: description: 'This field is only available when using Linux containers with cgroups v1. It is omitted or `null` when using cgroups v2. ' x-nullable: true type: array items: $ref: '#/definitions/ContainerBlkioStatEntry' io_service_time_recursive: description: 'This field is only available when using Linux containers with cgroups v1. It is omitted or `null` when using cgroups v2. ' x-nullable: true type: array items: $ref: '#/definitions/ContainerBlkioStatEntry' io_wait_time_recursive: description: 'This field is only available when using Linux containers with cgroups v1. It is omitted or `null` when using cgroups v2. ' x-nullable: true type: array items: $ref: '#/definitions/ContainerBlkioStatEntry' io_merged_recursive: description: 'This field is only available when using Linux containers with cgroups v1. It is omitted or `null` when using cgroups v2. ' x-nullable: true type: array items: $ref: '#/definitions/ContainerBlkioStatEntry' io_time_recursive: description: 'This field is only available when using Linux containers with cgroups v1. It is omitted or `null` when using cgroups v2. ' x-nullable: true type: array items: $ref: '#/definitions/ContainerBlkioStatEntry' sectors_recursive: description: 'This field is only available when using Linux containers with cgroups v1. It is omitted or `null` when using cgroups v2. ' x-nullable: true type: array items: $ref: '#/definitions/ContainerBlkioStatEntry' example: io_service_bytes_recursive: - major: 254 minor: 0 op: read value: 7593984 - major: 254 minor: 0 op: write value: 100 io_serviced_recursive: null io_queue_recursive: null io_service_time_recursive: null io_wait_time_recursive: null io_merged_recursive: null io_time_recursive: null sectors_recursive: null Storage: description: 'Information about the storage used by the container. ' type: object properties: RootFS: description: 'Information about the storage used for the container''s root filesystem. ' type: object x-nullable: true $ref: '#/definitions/RootFSStorage' ContainerState: description: 'ContainerState stores container''s running state. It''s part of ContainerJSONBase and will be returned by the "inspect" command. ' type: object x-nullable: true properties: Status: description: 'String representation of the container state. Can be one of "created", "running", "paused", "restarting", "removing", "exited", or "dead". ' type: string enum: - created - running - paused - restarting - removing - exited - dead example: running Running: description: 'Whether this container is running. Note that a running container can be _paused_. The `Running` and `Paused` booleans are not mutually exclusive: When pausing a container (on Linux), the freezer cgroup is used to suspend all processes in the container. Freezing the process requires the process to be running. As a result, paused containers are both `Running` _and_ `Paused`. Use the `Status` field instead to determine if a container''s state is "running". ' type: boolean example: true Paused: description: Whether this container is paused. type: boolean example: false Restarting: description: Whether this container is restarting. type: boolean example: false OOMKilled: description: 'Whether a process within this container has been killed because it ran out of memory since the container was last started. ' type: boolean example: false Dead: type: boolean example: false Pid: description: The process ID of this container type: integer example: 1234 ExitCode: description: The last exit code of this container type: integer example: 0 Error: type: string StartedAt: description: The time when this container was last started. type: string example: '2020-01-06T09:06:59.461876391Z' FinishedAt: description: The time when this container last exited. type: string example: '2020-01-06T09:07:59.461876391Z' Health: $ref: '#/definitions/Health' ContainerConfig: description: 'Configuration for a container that is portable between hosts. ' type: object properties: Hostname: description: 'The hostname to use for the container, as a valid RFC 1123 hostname. ' type: string example: 439f4e91bd1d Domainname: description: 'The domain name to use for the container. ' type: string User: description: 'Commands run as this user inside the container. If omitted, commands run as the user specified in the image the container was started from. Can be either user-name or UID, and optional group-name or GID, separated by a colon (`[<:group-name|GID>]`).' type: string example: 123:456 AttachStdin: description: Whether to attach to `stdin`. type: boolean default: false AttachStdout: description: Whether to attach to `stdout`. type: boolean default: true AttachStderr: description: Whether to attach to `stderr`. type: boolean default: true ExposedPorts: description: 'An object mapping ports to an empty object in the form: `{"/": {}}` ' type: object x-nullable: true additionalProperties: type: object enum: - {} default: {} example: 80/tcp: {} 443/tcp: {} Tty: description: 'Attach standard streams to a TTY, including `stdin` if it is not closed. ' type: boolean default: false OpenStdin: description: Open `stdin` type: boolean default: false StdinOnce: description: Close `stdin` after one attached client disconnects type: boolean default: false Env: description: 'A list of environment variables to set inside the container in the form `["VAR=value", ...]`. A variable without `=` is removed from the environment, rather than to have an empty value. ' type: array items: type: string example: - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin Cmd: description: 'Command to run specified as a string or an array of strings. ' type: array items: type: string example: - /bin/sh Healthcheck: $ref: '#/definitions/HealthConfig' ArgsEscaped: description: Command is already escaped (Windows only) type: boolean default: false example: false x-nullable: true Image: description: 'The name (or reference) of the image to use when creating the container, or which was used when the container was created. ' type: string example: example-image:1.0 Volumes: description: 'An object mapping mount point paths inside the container to empty objects. ' type: object additionalProperties: type: object enum: - {} default: {} WorkingDir: description: The working directory for commands to run in. type: string example: /public/ Entrypoint: description: 'The entry point for the container as a string or an array of strings. If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). ' type: array items: type: string example: [] NetworkDisabled: description: Disable networking for the container. type: boolean x-nullable: true OnBuild: description: '`ONBUILD` metadata that were defined in the image''s `Dockerfile`. ' type: array x-nullable: true items: type: string example: [] Labels: description: User-defined key/value metadata. type: object additionalProperties: type: string example: com.example.some-label: some-value com.example.some-other-label: some-other-value StopSignal: description: 'Signal to stop a container as a string or unsigned integer. ' type: string example: SIGTERM x-nullable: true StopTimeout: description: Timeout to stop a container in seconds. type: integer default: 10 x-nullable: true Shell: description: 'Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. ' type: array x-nullable: true items: type: string example: - /bin/sh - -c OCIPlatform: type: object x-go-name: Platform x-nullable: true description: 'Describes the platform which the image in the manifest runs on, as defined in the [OCI Image Index Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md). ' properties: architecture: description: 'The CPU architecture, for example `amd64` or `ppc64`. ' type: string example: arm os: description: 'The operating system, for example `linux` or `windows`. ' type: string example: windows os.version: description: 'Optional field specifying the operating system version, for example on Windows `10.0.19041.1165`. ' type: string example: 10.0.19041.1165 os.features: description: 'Optional field specifying an array of strings, each listing a required OS feature (for example on Windows `win32k`). ' type: array items: type: string example: - win32k variant: description: 'Optional field specifying a variant of the CPU, for example `v7` to specify ARMv7 when architecture is `arm`. ' type: string example: v7 ContainerSummary: type: object properties: Id: description: The ID of this container as a 128-bit (64-character) hexadecimal string (32 bytes). type: string x-go-name: ID minLength: 64 maxLength: 64 pattern: ^[0-9a-fA-F]{64}$ example: aa86eacfb3b3ed4cd362c1e88fc89a53908ad05fb3a4103bca3f9b28292d14bf Names: description: 'The names associated with this container. Most containers have a single name, but when using legacy "links", the container can have multiple names. For historic reasons, names are prefixed with a forward-slash (`/`).' type: array items: type: string example: - /funny_chatelet Image: description: 'The name or ID of the image used to create the container. This field shows the image reference as was specified when creating the container, which can be in its canonical form (e.g., `docker.io/library/ubuntu:latest` or `docker.io/library/ubuntu@sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782`), short form (e.g., `ubuntu:latest`)), or the ID(-prefix) of the image (e.g., `72297848456d`). The content of this field can be updated at runtime if the image used to create the container is untagged, in which case the field is updated to contain the the image ID (digest) it was resolved to in its canonical, non-truncated form (e.g., `sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782`).' type: string example: docker.io/library/ubuntu:latest ImageID: description: The ID (digest) of the image that this container was created from. type: string example: sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782 ImageManifestDescriptor: $ref: '#/definitions/OCIDescriptor' x-nullable: true description: 'OCI descriptor of the platform-specific manifest of the image the container was created from. Note: Only available if the daemon provides a multi-platform image store. This field is not populated in the `GET /system/df` endpoint. ' Command: description: Command to run when starting the container type: string example: /bin/bash Created: description: 'Date and time at which the container was created as a Unix timestamp (number of seconds since EPOCH).' type: integer format: int64 example: '1739811096' Ports: description: Port-mappings for the container. type: array items: $ref: '#/definitions/PortSummary' SizeRw: description: 'The size of files that have been created or changed by this container. This field is omitted by default, and only set when size is requested in the API request.' type: integer format: int64 x-nullable: true example: '122880' SizeRootFs: description: 'The total size of all files in the read-only layers from the image that the container uses. These layers can be shared between containers. This field is omitted by default, and only set when size is requested in the API request.' type: integer format: int64 x-nullable: true example: '1653948416' Labels: description: User-defined key/value metadata. type: object additionalProperties: type: string example: com.example.vendor: Acme com.example.license: GPL com.example.version: '1.0' State: description: 'The state of this container. ' type: string enum: - created - running - paused - restarting - exited - removing - dead example: running Status: description: Additional human-readable status of this container (e.g. `Exit 0`) type: string example: Up 4 days HostConfig: type: object description: 'Summary of host-specific runtime information of the container. This is a reduced set of information in the container''s "HostConfig" as available in the container "inspect" response.' properties: NetworkMode: description: 'Networking mode (`host`, `none`, `container:`) or name of the primary network the container is using. This field is primarily for backward compatibility. The container can be connected to multiple networks for which information can be found in the `NetworkSettings.Networks` field, which enumerates settings per network.' type: string example: mynetwork Annotations: description: Arbitrary key-value metadata attached to the container. type: object x-nullable: true additionalProperties: type: string example: io.kubernetes.docker.type: container io.kubernetes.sandbox.id: 3befe639bed0fd6afdd65fd1fa84506756f59360ec4adc270b0fdac9be22b4d3 NetworkSettings: description: Summary of the container's network settings type: object properties: Networks: type: object description: 'Summary of network-settings for each network the container is attached to.' additionalProperties: $ref: '#/definitions/EndpointSettings' Mounts: type: array description: List of mounts used by the container. items: $ref: '#/definitions/MountPoint' Health: type: object description: 'Summary of health status Added in v1.52, before that version all container summary not include Health. After this attribute introduced, it includes containers with no health checks configured, or containers that are not running with none' properties: Status: type: string description: the health status of the container enum: - none - starting - healthy - unhealthy example: healthy FailingStreak: description: FailingStreak is the number of consecutive failures type: integer example: 0 ContainerBlkioStatEntry: description: 'Blkio stats entry. This type is Linux-specific and omitted for Windows containers. ' type: object x-go-name: BlkioStatEntry x-nullable: true properties: major: type: integer format: uint64 example: 254 minor: type: integer format: uint64 example: 0 op: type: string example: read value: type: integer format: uint64 example: 7593984 ContainerThrottlingData: description: 'CPU throttling stats of the container. This type is Linux-specific and omitted for Windows containers. ' type: object x-go-name: ThrottlingData x-nullable: true properties: periods: description: 'Number of periods with throttling active. ' type: integer format: uint64 example: 0 throttled_periods: description: 'Number of periods when the container hit its throttling limit. ' type: integer format: uint64 example: 0 throttled_time: description: 'Aggregated time (in nanoseconds) the container was throttled for. ' type: integer format: uint64 example: 0 ContainerInspectResponse: type: object title: ContainerInspectResponse x-go-name: InspectResponse properties: Id: description: The ID of this container as a 128-bit (64-character) hexadecimal string (32 bytes). type: string x-go-name: ID minLength: 64 maxLength: 64 pattern: ^[0-9a-fA-F]{64}$ example: aa86eacfb3b3ed4cd362c1e88fc89a53908ad05fb3a4103bca3f9b28292d14bf Created: description: 'Date and time at which the container was created, formatted in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.' type: string format: dateTime x-nullable: true example: '2025-02-17T17:43:39.64001363Z' Path: description: The path to the command being run type: string example: /bin/sh Args: description: The arguments to the command being run type: array items: type: string example: - -c - exit 9 State: $ref: '#/definitions/ContainerState' Image: description: The ID (digest) of the image that this container was created from. type: string example: sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782 ResolvConfPath: description: 'Location of the `/etc/resolv.conf` generated for the container on the host. This file is managed through the docker daemon, and should not be accessed or modified by other tools.' type: string example: /var/lib/docker/containers/aa86eacfb3b3ed4cd362c1e88fc89a53908ad05fb3a4103bca3f9b28292d14bf/resolv.conf HostnamePath: description: 'Location of the `/etc/hostname` generated for the container on the host. This file is managed through the docker daemon, and should not be accessed or modified by other tools.' type: string example: /var/lib/docker/containers/aa86eacfb3b3ed4cd362c1e88fc89a53908ad05fb3a4103bca3f9b28292d14bf/hostname HostsPath: description: 'Location of the `/etc/hosts` generated for the container on the host. This file is managed through the docker daemon, and should not be accessed or modified by other tools.' type: string example: /var/lib/docker/containers/aa86eacfb3b3ed4cd362c1e88fc89a53908ad05fb3a4103bca3f9b28292d14bf/hosts LogPath: description: 'Location of the file used to buffer the container''s logs. Depending on the logging-driver used for the container, this field may be omitted. This file is managed through the docker daemon, and should not be accessed or modified by other tools.' type: string x-nullable: true example: /var/lib/docker/containers/5b7c7e2b992aa426584ce6c47452756066be0e503a08b4516a433a54d2f69e59/5b7c7e2b992aa426584ce6c47452756066be0e503a08b4516a433a54d2f69e59-json.log Name: description: 'The name associated with this container. For historic reasons, the name may be prefixed with a forward-slash (`/`).' type: string example: /funny_chatelet RestartCount: description: 'Number of times the container was restarted since it was created, or since daemon was started.' type: integer example: 0 Driver: description: 'The storage-driver used for the container''s filesystem (graph-driver or snapshotter).' type: string example: overlayfs Platform: description: 'The platform (operating system) for which the container was created. This field was introduced for the experimental "LCOW" (Linux Containers On Windows) features, which has been removed. In most cases, this field is equal to the host''s operating system (`linux` or `windows`).' type: string example: linux ImageManifestDescriptor: $ref: '#/definitions/OCIDescriptor' description: 'OCI descriptor of the platform-specific manifest of the image the container was created from. Note: Only available if the daemon provides a multi-platform image store.' MountLabel: description: SELinux mount label set for the container. type: string example: '' ProcessLabel: description: SELinux process label set for the container. type: string example: '' AppArmorProfile: description: The AppArmor profile set for the container. type: string example: '' ExecIDs: description: IDs of exec instances that are running in the container. type: array items: type: string x-nullable: true example: - b35395de42bc8abd327f9dd65d913b9ba28c74d2f0734eeeae84fa1c616a0fca - 3fc1232e5cd20c8de182ed81178503dc6437f4e7ef12b52cc5e8de020652f1c4 HostConfig: $ref: '#/definitions/HostConfig' GraphDriver: $ref: '#/definitions/DriverData' x-nullable: true Storage: $ref: '#/definitions/Storage' x-nullable: true SizeRw: description: 'The size of files that have been created or changed by this container. This field is omitted by default, and only set when size is requested in the API request.' type: integer format: int64 x-nullable: true example: '122880' SizeRootFs: description: 'The total size of all files in the read-only layers from the image that the container uses. These layers can be shared between containers. This field is omitted by default, and only set when size is requested in the API request.' type: integer format: int64 x-nullable: true example: '1653948416' Mounts: description: List of mounts used by the container. type: array items: $ref: '#/definitions/MountPoint' Config: $ref: '#/definitions/ContainerConfig' NetworkSettings: $ref: '#/definitions/NetworkSettings' EndpointSettings: description: Configuration for a network endpoint. type: object properties: IPAMConfig: $ref: '#/definitions/EndpointIPAMConfig' Links: type: array items: type: string example: - container_1 - container_2 MacAddress: description: 'MAC address for the endpoint on this network. The network driver might ignore this parameter. ' type: string example: 02:42:ac:11:00:04 x-go-type: type: HardwareAddr Aliases: type: array items: type: string example: - server_x - server_y DriverOpts: description: 'DriverOpts is a mapping of driver options and values. These options are passed directly to the driver and are driver specific. ' type: object x-nullable: true additionalProperties: type: string example: com.example.some-label: some-value com.example.some-other-label: some-other-value GwPriority: description: 'This property determines which endpoint will provide the default gateway for a container. The endpoint with the highest priority will be used. If multiple endpoints have the same priority, endpoints are lexicographically sorted based on their network name, and the one that sorts first is picked. ' type: integer format: int64 example: - 10 NetworkID: description: 'Unique ID of the network. ' type: string example: 08754567f1f40222263eab4102e1c733ae697e8e354aa9cd6e18d7402835292a EndpointID: description: 'Unique ID for the service endpoint in a Sandbox. ' type: string example: b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b Gateway: description: 'Gateway address for this network. ' type: string example: 172.17.0.1 IPAddress: description: 'IPv4 address. ' type: string example: 172.17.0.4 x-go-type: type: Addr import: package: net/netip IPPrefixLen: description: 'Mask length of the IPv4 address. ' type: integer example: 16 IPv6Gateway: description: 'IPv6 gateway address. ' type: string example: 2001:db8:2::100 x-go-type: type: Addr import: package: net/netip GlobalIPv6Address: description: 'Global IPv6 address. ' type: string example: 2001:db8::5689 x-go-type: type: Addr import: package: net/netip GlobalIPv6PrefixLen: description: 'Mask length of the global IPv6 address. ' type: integer format: int64 example: 64 DNSNames: description: 'List of all DNS names an endpoint has on a specific network. This list is based on the container name, network aliases, container short ID, and hostname. These DNS names are non-fully qualified but can contain several dots. You can get fully qualified DNS names by appending `.`. For instance, if container name is `my.ctr` and the network is named `testnet`, `DNSNames` will contain `my.ctr` and the FQDN will be `my.ctr.testnet`. ' type: array items: type: string example: - foobar - server_x - server_y - my.ctr MountType: description: 'The mount type. Available types: - `bind` a mount of a file or directory from the host into the container. - `cluster` a Swarm cluster volume. - `image` an OCI image. - `npipe` a named pipe from the host into the container. - `tmpfs` a `tmpfs`. - `volume` a docker volume with the given `Name`.' type: string enum: - bind - cluster - image - npipe - tmpfs - volume example: volume RootFSStorage: description: 'Information about the storage used for the container''s root filesystem. ' type: object x-go-name: RootFSStorage properties: Snapshot: description: 'Information about the snapshot used for the container''s root filesystem. ' type: object x-nullable: true $ref: '#/definitions/RootFSStorageSnapshot' PortSummary: type: object description: 'Describes a port-mapping between the container and the host. ' required: - PrivatePort - Type properties: IP: type: string format: ip-address description: Host IP address that the container's port is mapped to x-go-type: type: Addr import: package: net/netip PrivatePort: type: integer format: uint16 x-nullable: false description: Port on the container PublicPort: type: integer format: uint16 description: Port exposed on the host Type: type: string x-nullable: false enum: - tcp - udp - sctp example: PrivatePort: 8080 PublicPort: 80 Type: tcp RootFSStorageSnapshot: description: 'Information about a snapshot backend of the container''s root filesystem. ' type: object x-go-name: RootFSStorageSnapshot properties: Name: description: Name of the snapshotter. type: string x-nullable: false PortBinding: description: 'PortBinding represents a binding between a host IP address and a host port. ' type: object properties: HostIp: description: Host IP address that the container's port is mapped to. type: string example: 127.0.0.1 x-go-type: type: Addr import: package: net/netip HostPort: description: Host port number that the container's port is mapped to. type: string example: '4443' Health: description: 'Health stores information about the container''s healthcheck results. ' type: object x-nullable: true properties: Status: description: 'Status is one of `none`, `starting`, `healthy` or `unhealthy` - "none" Indicates there is no healthcheck - "starting" Starting indicates that the container is not yet ready - "healthy" Healthy indicates that the container is running correctly - "unhealthy" Unhealthy indicates that the container has a problem ' type: string enum: - none - starting - healthy - unhealthy example: healthy FailingStreak: description: FailingStreak is the number of consecutive failures type: integer example: 0 Log: type: array description: 'Log contains the last few results (oldest first) ' items: $ref: '#/definitions/HealthcheckResult' ContainerWaitResponse: description: OK response to ContainerWait operation type: object x-go-name: WaitResponse title: ContainerWaitResponse required: - StatusCode properties: StatusCode: description: Exit code of the container type: integer format: int64 x-nullable: false Error: $ref: '#/definitions/ContainerWaitExitError' MountPoint: type: object description: 'MountPoint represents a mount point configuration inside the container. This is used for reporting the mountpoints in use by a container. ' properties: Type: description: 'The mount type: - `bind` a mount of a file or directory from the host into the container. - `cluster` a Swarm cluster volume. - `image` an OCI image. - `npipe` a named pipe from the host into the container. - `tmpfs` a `tmpfs`. - `volume` a docker volume with the given `Name`. ' allOf: - $ref: '#/definitions/MountType' example: volume Name: description: 'Name is the name reference to the underlying data defined by `Source` e.g., the volume name. ' type: string example: myvolume Source: description: 'Source location of the mount. For volumes, this contains the storage location of the volume (within `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains the source (host) part of the bind-mount. For `tmpfs` mount points, this field is empty. ' type: string example: /var/lib/docker/volumes/myvolume/_data Destination: description: 'Destination is the path relative to the container root (`/`) where the `Source` is mounted inside the container. ' type: string example: /usr/share/nginx/html/ Driver: description: 'Driver is the volume driver used to create the volume (if it is a volume). ' type: string example: local Mode: description: 'Mode is a comma separated list of options supplied by the user when creating the bind/volume mount. The default is platform-specific (`"z"` on Linux, empty on Windows). ' type: string example: z RW: description: 'Whether the mount is mounted writable (read-write). ' type: boolean example: true Propagation: description: 'Propagation describes how mounts are propagated from the host into the mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) for details. This field is not used on Windows. ' type: string example: '' NetworkSettings: description: NetworkSettings exposes the network settings in the API type: object properties: SandboxID: description: SandboxID uniquely represents a container's network stack. type: string example: 9d12daf2c33f5959c8bf90aa513e4f65b561738661003029ec84830cd503a0c3 SandboxKey: description: SandboxKey is the full path of the netns handle type: string example: /var/run/docker/netns/8ab54b426c38 Ports: $ref: '#/definitions/PortMap' Networks: description: 'Information about all networks that the container is connected to. ' type: object additionalProperties: $ref: '#/definitions/EndpointSettings' ContainerNetworkStats: description: 'Aggregates the network stats of one container ' type: object x-go-name: NetworkStats x-nullable: true properties: rx_bytes: description: 'Bytes received. Windows and Linux. ' type: integer format: uint64 example: 5338 rx_packets: description: 'Packets received. Windows and Linux. ' type: integer format: uint64 example: 36 rx_errors: description: 'Received errors. Not used on Windows. This field is Linux-specific and always zero for Windows containers. ' type: integer format: uint64 example: 0 rx_dropped: description: 'Incoming packets dropped. Windows and Linux. ' type: integer format: uint64 example: 0 tx_bytes: description: 'Bytes sent. Windows and Linux. ' type: integer format: uint64 example: 1200 tx_packets: description: 'Packets sent. Windows and Linux. ' type: integer format: uint64 example: 12 tx_errors: description: 'Sent errors. Not used on Windows. This field is Linux-specific and always zero for Windows containers. ' type: integer format: uint64 example: 0 tx_dropped: description: 'Outgoing packets dropped. Windows and Linux. ' type: integer format: uint64 example: 0 endpoint_id: description: 'Endpoint ID. Not used on Linux. This field is Windows-specific and omitted for Linux containers. ' type: string x-nullable: true instance_id: description: 'Instance ID. Not used on Linux. This field is Windows-specific and omitted for Linux containers. ' type: string x-nullable: true ErrorResponse: description: Represents an error. type: object required: - message properties: message: description: The error message. type: string x-nullable: false example: message: Something went wrong. Mount: type: object properties: Target: description: Container path. type: string Source: description: 'Mount source (e.g. a volume name, a host path). The source cannot be specified when using `Type=tmpfs`. For `Type=bind`, the source path must either exist, or the `CreateMountpoint` must be set to `true` to create the source path on the host if missing. For `Type=npipe`, the pipe must exist prior to creating the container.' type: string Type: description: 'The mount type. Available types: - `bind` Mounts a file or directory from the host into the container. The `Source` must exist prior to creating the container. - `cluster` a Swarm cluster volume - `image` Mounts an image. - `npipe` Mounts a named pipe from the host into the container. The `Source` must exist prior to creating the container. - `tmpfs` Create a tmpfs with the given options. The mount `Source` cannot be specified for tmpfs. - `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. ' allOf: - $ref: '#/definitions/MountType' ReadOnly: description: Whether the mount should be read-only. type: boolean Consistency: description: 'The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`.' type: string BindOptions: description: Optional configuration for the `bind` type. type: object properties: Propagation: description: A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`. type: string enum: - private - rprivate - shared - rshared - slave - rslave NonRecursive: description: Disable recursive bind mount. type: boolean default: false CreateMountpoint: description: Create mount point on host if missing type: boolean default: false ReadOnlyNonRecursive: description: 'Make the mount non-recursively read-only, but still leave the mount recursive (unless NonRecursive is set to `true` in conjunction). Added in v1.44, before that version all read-only mounts were non-recursive by default. To match the previous behaviour this will default to `true` for clients on versions prior to v1.44. ' type: boolean default: false ReadOnlyForceRecursive: description: Raise an error if the mount cannot be made recursively read-only. type: boolean default: false VolumeOptions: description: Optional configuration for the `volume` type. type: object properties: NoCopy: description: Populate volume with data from the target. type: boolean default: false Labels: description: User-defined key/value metadata. type: object additionalProperties: type: string DriverConfig: description: Map of driver specific options type: object properties: Name: description: Name of the driver to use to create the volume. type: string Options: description: key/value map of driver specific options. type: object additionalProperties: type: string Subpath: description: Source path inside the volume. Must be relative without any back traversals. type: string example: dir-inside-volume/subdirectory ImageOptions: description: Optional configuration for the `image` type. type: object properties: Subpath: description: Source path inside the image. Must be relative without any back traversals. type: string example: dir-inside-image/subdirectory TmpfsOptions: description: Optional configuration for the `tmpfs` type. type: object properties: SizeBytes: description: The size for the tmpfs mount in bytes. type: integer format: int64 Mode: description: 'The permission mode for the tmpfs mount in an integer. The value must not be in octal format (e.g. 755) but rather the decimal representation of the octal value (e.g. 493). ' type: integer Options: description: 'The options to be passed to the tmpfs mount. An array of arrays. Flag options should be provided as 1-length arrays. Other types should be provided as as 2-length arrays, where the first item is the key and the second the value. ' type: array items: type: array minItems: 1 maxItems: 2 items: type: string example: - - noexec DeviceMapping: type: object description: A device mapping between the host and container properties: PathOnHost: type: string PathInContainer: type: string CgroupPermissions: type: string example: PathOnHost: /dev/deviceName PathInContainer: /dev/deviceName CgroupPermissions: mrw EndpointIPAMConfig: description: 'EndpointIPAMConfig represents an endpoint''s IPAM configuration. ' type: object x-nullable: true properties: IPv4Address: type: string example: 172.20.30.33 x-go-type: type: Addr import: package: net/netip IPv6Address: type: string example: 2001:db8:abcd::3033 x-go-type: type: Addr import: package: net/netip LinkLocalIPs: type: array items: type: string x-go-type: type: Addr import: package: net/netip example: - 169.254.34.68 - fe80::3468 ContainerWaitExitError: description: container waiting error, if any type: object x-go-name: WaitExitError properties: Message: description: Details of an error type: string ContainerMemoryStats: description: 'Aggregates all memory stats since container inception on Linux. Windows returns stats for commit and private working set only. ' type: object x-go-name: MemoryStats properties: usage: description: 'Current `res_counter` usage for memory. This field is Linux-specific and omitted for Windows containers. ' type: integer format: uint64 x-nullable: true example: 0 max_usage: description: 'Maximum usage ever recorded. This field is Linux-specific and only supported on cgroups v1. It is omitted when using cgroups v2 and for Windows containers. ' type: integer format: uint64 x-nullable: true example: 0 stats: description: 'All the stats exported via memory.stat. The fields in this object differ between cgroups v1 and v2. On cgroups v1, fields such as `cache`, `rss`, `mapped_file` are available. On cgroups v2, fields such as `file`, `anon`, `inactive_file` are available. This field is Linux-specific and omitted for Windows containers. ' type: object additionalProperties: type: integer format: uint64 x-nullable: true example: active_anon: 1572864 active_file: 5115904 anon: 1572864 anon_thp: 0 file: 7626752 file_dirty: 0 file_mapped: 2723840 file_writeback: 0 inactive_anon: 0 inactive_file: 2510848 kernel_stack: 16384 pgactivate: 0 pgdeactivate: 0 pgfault: 2042 pglazyfree: 0 pglazyfreed: 0 pgmajfault: 45 pgrefill: 0 pgscan: 0 pgsteal: 0 shmem: 0 slab: 1180928 slab_reclaimable: 725576 slab_unreclaimable: 455352 sock: 0 thp_collapse_alloc: 0 thp_fault_alloc: 1 unevictable: 0 workingset_activate: 0 workingset_nodereclaim: 0 workingset_refault: 0 failcnt: description: 'Number of times memory usage hits limits. This field is Linux-specific and only supported on cgroups v1. It is omitted when using cgroups v2 and for Windows containers. ' type: integer format: uint64 x-nullable: true example: 0 limit: description: 'This field is Linux-specific and omitted for Windows containers. ' type: integer format: uint64 x-nullable: true example: 8217579520 commitbytes: description: 'Committed bytes. This field is Windows-specific and omitted for Linux containers. ' type: integer format: uint64 x-nullable: true example: 0 commitpeakbytes: description: 'Peak committed bytes. This field is Windows-specific and omitted for Linux containers. ' type: integer format: uint64 x-nullable: true example: 0 privateworkingset: description: 'Private working set. This field is Windows-specific and omitted for Linux containers. ' type: integer format: uint64 x-nullable: true example: 0 ContainerTopResponse: type: object x-go-name: TopResponse title: ContainerTopResponse description: Container "top" response. properties: Titles: description: The ps column titles type: array items: type: string example: Titles: - UID - PID - PPID - C - STIME - TTY - TIME - CMD Processes: description: 'Each process running in the container, where each process is an array of values corresponding to the titles.' type: array items: type: array items: type: string example: Processes: - - root - '13642' - '882' - '0' - '17:03' - pts/0 - 00:00:00 - /bin/bash - - root - '13735' - '13642' - '0' - '17:06' - pts/0 - 00:00:00 - sleep 10