Docker Engine API — Container
Docker Engine API — Container. 25 operations. Lead operation: Create a container. Self-contained Naftiko capability covering one Docker business surface.
What You Can Do
MCP Tools
create-container
Create a container
list-containers
List containers
delete-stopped-containers
Delete stopped containers
remove-container
Remove a container
get-information-about-files-container
Get information about files in a container
get-archive-filesystem-resource-container
Get an archive of a filesystem resource in a container
extract-archive-files-folders-directory
Extract an archive of files or folders to a directory in a container
attach-container
Attach to a container
attach-container-websocket
Attach to a container via a websocket
get-changes-container-s-filesystem
Get changes on a container’s filesystem
export-container
Export a container
inspect-container
Inspect a container
kill-container
Kill a container
get-container-logs
Get container logs
pause-container
Pause a container
rename-container
Rename a container
resize-container-tty
Resize a container TTY
restart-container
Restart a container
start-container
Start a container
get-container-stats-based-resource
Get container stats based on resource usage
stop-container
Stop a container
list-processes-running-inside-container
List processes running inside a container
unpause-container
Unpause a container
update-container
Update a container
wait-container
Wait for a container
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: Docker Engine API — Container
description: 'Docker Engine API — Container. 25 operations. Lead operation: Create a container. Self-contained Naftiko capability
covering one Docker business surface.'
tags:
- Docker
- Container
created: '2026-05-19'
modified: '2026-05-19'
binds:
- namespace: env
keys:
DOCKER_API_KEY: DOCKER_API_KEY
capability:
consumes:
- type: http
namespace: docker-container
baseUri: ''
description: Docker Engine API — Container business capability. Self-contained, no shared references.
resources:
- name: containers-create
path: /containers/create
operations:
- name: containercreate
method: POST
description: Create a container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: name
in: query
type: string
description: Assign the specified name to the container. Must match
- name: platform
in: query
type: string
description: Platform in the format `os[/arch[/variant]]` used for image lookup.
- name: body
in: body
type: string
description: Container to create
required: true
- name: containers-json
path: /containers/json
operations:
- name: containerlist
method: GET
description: List containers
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: all
in: query
type: boolean
description: Return all containers. By default, only running containers are shown.
- name: limit
in: query
type: integer
description: Return this number of most recently created containers, including
- name: size
in: query
type: boolean
description: Return the size of container as fields `SizeRw` and `SizeRootFs`.
- name: filters
in: query
type: string
description: Filters to process on the container list, encoded as JSON (a
- name: containers-prune
path: /containers/prune
operations:
- name: containerprune
method: POST
description: Delete stopped containers
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: filters
in: query
type: string
description: Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
- name: containers-id
path: /containers/{id}
operations:
- name: containerdelete
method: DELETE
description: Remove a container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: ID or name of the container
required: true
- name: v
in: query
type: boolean
description: Remove anonymous volumes associated with the container.
- name: force
in: query
type: boolean
description: If the container is running, kill it before removing it.
- name: link
in: query
type: boolean
description: Remove the specified link associated with the container.
- name: containers-id-archive
path: /containers/{id}/archive
operations:
- name: containerarchiveinfo
method: HEAD
description: Get information about files in a container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: ID or name of the container
required: true
- name: path
in: query
type: string
description: Resource in the container’s filesystem to archive.
required: true
- name: containerarchive
method: GET
description: Get an archive of a filesystem resource in a container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: ID or name of the container
required: true
- name: path
in: query
type: string
description: Resource in the container’s filesystem to archive.
required: true
- name: putcontainerarchive
method: PUT
description: Extract an archive of files or folders to a directory in a container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: ID or name of the container
required: true
- name: path
in: query
type: string
description: Path to a directory in the container to extract the archive’s contents into.
required: true
- name: noOverwriteDirNonDir
in: query
type: string
description: If `1`, `true`, or `True` then it will be an error if unpacking the
- name: copyUIDGID
in: query
type: string
description: If `1`, `true`, then it will copy UID/GID maps to the dest file or
- name: inputStream
in: body
type: string
description: The input stream must be a tar archive compressed with one of the
required: true
- name: containers-id-attach
path: /containers/{id}/attach
operations:
- name: containerattach
method: POST
description: Attach to a container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: ID or name of the container
required: true
- name: detachKeys
in: query
type: string
description: Override the key sequence for detaching a container.Format is a single
- name: logs
in: query
type: boolean
description: Replay previous logs from the container.
- name: stream
in: query
type: boolean
description: Stream attached streams from the time the request was made onwards.
- name: stdin
in: query
type: boolean
description: Attach to `stdin`
- name: stdout
in: query
type: boolean
description: Attach to `stdout`
- name: stderr
in: query
type: boolean
description: Attach to `stderr`
- name: containers-id-attach-ws
path: /containers/{id}/attach/ws
operations:
- name: containerattachwebsocket
method: GET
description: Attach to a container via a websocket
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: ID or name of the container
required: true
- name: detachKeys
in: query
type: string
description: Override the key sequence for detaching a container.Format is a single
- name: logs
in: query
type: boolean
description: Return logs
- name: stream
in: query
type: boolean
description: Return stream
- name: stdin
in: query
type: boolean
description: Attach to `stdin`
- name: stdout
in: query
type: boolean
description: Attach to `stdout`
- name: stderr
in: query
type: boolean
description: Attach to `stderr`
- name: containers-id-changes
path: /containers/{id}/changes
operations:
- name: containerchanges
method: GET
description: Get changes on a container’s filesystem
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: ID or name of the container
required: true
- name: containers-id-export
path: /containers/{id}/export
operations:
- name: containerexport
method: GET
description: Export a container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: ID or name of the container
required: true
- name: containers-id-json
path: /containers/{id}/json
operations:
- name: containerinspect
method: GET
description: Inspect a container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: ID or name of the container
required: true
- name: size
in: query
type: boolean
description: Return the size of container as fields `SizeRw` and `SizeRootFs`
- name: containers-id-kill
path: /containers/{id}/kill
operations:
- name: containerkill
method: POST
description: Kill a container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: ID or name of the container
required: true
- name: signal
in: query
type: string
description: Signal to send to the container as an integer or string (e.g. `SIGINT`).
- name: containers-id-logs
path: /containers/{id}/logs
operations:
- name: containerlogs
method: GET
description: Get container logs
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: ID or name of the container
required: true
- name: follow
in: query
type: boolean
description: Keep connection after returning logs.
- name: stdout
in: query
type: boolean
description: Return logs from `stdout`
- name: stderr
in: query
type: boolean
description: Return logs from `stderr`
- name: since
in: query
type: integer
description: Only return logs since this time, as a UNIX timestamp
- name: until
in: query
type: integer
description: Only return logs before this time, as a UNIX timestamp
- name: timestamps
in: query
type: boolean
description: Add timestamps to every log line
- name: tail
in: query
type: string
description: Only return this number of log lines from the end of the logs.
- name: containers-id-pause
path: /containers/{id}/pause
operations:
- name: containerpause
method: POST
description: Pause a container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: ID or name of the container
required: true
- name: containers-id-rename
path: /containers/{id}/rename
operations:
- name: containerrename
method: POST
description: Rename a container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: ID or name of the container
required: true
- name: name
in: query
type: string
description: New name for the container
required: true
- name: containers-id-resize
path: /containers/{id}/resize
operations:
- name: containerresize
method: POST
description: Resize a container TTY
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: ID or name of the container
required: true
- name: h
in: query
type: integer
description: Height of the TTY session in characters
required: true
- name: w
in: query
type: integer
description: Width of the TTY session in characters
required: true
- name: containers-id-restart
path: /containers/{id}/restart
operations:
- name: containerrestart
method: POST
description: Restart a container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: ID or name of the container
required: true
- name: signal
in: query
type: string
description: Signal to send to the container as an integer or string (e.g. `SIGINT`).
- name: t
in: query
type: integer
description: Number of seconds to wait before killing the container
- name: containers-id-start
path: /containers/{id}/start
operations:
- name: containerstart
method: POST
description: Start a container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: ID or name of the container
required: true
- name: detachKeys
in: query
type: string
description: Override the key sequence for detaching a container. Format is a
- name: containers-id-stats
path: /containers/{id}/stats
operations:
- name: containerstats
method: GET
description: Get container stats based on resource usage
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: ID or name of the container
required: true
- name: stream
in: query
type: boolean
description: Stream the output. If false, the stats will be output once and then
- name: one-shot
in: query
type: boolean
description: Only get a single stat instead of waiting for 2 cycles. Must be used
- name: containers-id-stop
path: /containers/{id}/stop
operations:
- name: containerstop
method: POST
description: Stop a container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: ID or name of the container
required: true
- name: signal
in: query
type: string
description: Signal to send to the container as an integer or string (e.g. `SIGINT`).
- name: t
in: query
type: integer
description: Number of seconds to wait before killing the container
- name: containers-id-top
path: /containers/{id}/top
operations:
- name: containertop
method: GET
description: List processes running inside a container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: ID or name of the container
required: true
- name: ps_args
in: query
type: string
description: The arguments to pass to `ps`. For example, `aux`
- name: containers-id-unpause
path: /containers/{id}/unpause
operations:
- name: containerunpause
method: POST
description: Unpause a container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: ID or name of the container
required: true
- name: containers-id-update
path: /containers/{id}/update
operations:
- name: containerupdate
method: POST
description: Update a container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: ID or name of the container
required: true
- name: update
in: body
type: string
required: true
- name: containers-id-wait
path: /containers/{id}/wait
operations:
- name: containerwait
method: POST
description: Wait for a container
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: ID or name of the container
required: true
- name: condition
in: query
type: string
description: Wait until a container state reaches the given condition.
exposes:
- type: rest
namespace: docker-container-rest
port: 8080
description: REST adapter for Docker Engine API — Container. One Spectral-compliant resource per consumed operation, prefixed
with /v1.
resources:
- path: /v1/containers/create
name: containers-create
description: REST surface for containers-create.
operations:
- method: POST
name: containercreate
description: Create a container
call: docker-container.containercreate
with:
name: rest.name
platform: rest.platform
body: rest.body
outputParameters:
- type: object
mapping: $.
- path: /v1/containers/json
name: containers-json
description: REST surface for containers-json.
operations:
- method: GET
name: containerlist
description: List containers
call: docker-container.containerlist
with:
all: rest.all
limit: rest.limit
size: rest.size
filters: rest.filters
outputParameters:
- type: object
mapping: $.
- path: /v1/containers/prune
name: containers-prune
description: REST surface for containers-prune.
operations:
- method: POST
name: containerprune
description: Delete stopped containers
call: docker-container.containerprune
with:
filters: rest.filters
outputParameters:
- type: object
mapping: $.
- path: /v1/containers/{id}
name: containers-id
description: REST surface for containers-id.
operations:
- method: DELETE
name: containerdelete
description: Remove a container
call: docker-container.containerdelete
with:
id: rest.id
v: rest.v
force: rest.force
link: rest.link
outputParameters:
- type: object
mapping: $.
- path: /v1/containers/{id}/archive
name: containers-id-archive
description: REST surface for containers-id-archive.
operations:
- method: HEAD
name: containerarchiveinfo
description: Get information about files in a container
call: docker-container.containerarchiveinfo
with:
id: rest.id
path: rest.path
outputParameters:
- type: object
mapping: $.
- method: GET
name: containerarchive
description: Get an archive of a filesystem resource in a container
call: docker-container.containerarchive
with:
id: rest.id
path: rest.path
outputParameters:
- type: object
mapping: $.
- method: PUT
name: putcontainerarchive
description: Extract an archive of files or folders to a directory in a container
call: docker-container.putcontainerarchive
with:
id: rest.id
path: rest.path
noOverwriteDirNonDir: rest.noOverwriteDirNonDir
copyUIDGID: rest.copyUIDGID
inputStream: rest.inputStream
outputParameters:
- type: object
mapping: $.
- path: /v1/containers/{id}/attach
name: containers-id-attach
description: REST surface for containers-id-attach.
operations:
- method: POST
name: containerattach
description: Attach to a container
call: docker-container.containerattach
with:
id: rest.id
detachKeys: rest.detachKeys
logs: rest.logs
stream: rest.stream
stdin: rest.stdin
stdout: rest.stdout
stderr: rest.stderr
outputParameters:
- type: object
mapping: $.
- path: /v1/containers/{id}/attach/ws
name: containers-id-attach-ws
description: REST surface for containers-id-attach-ws.
operations:
- method: GET
name: containerattachwebsocket
description: Attach to a container via a websocket
call: docker-container.containerattachwebsocket
with:
id: rest.id
detachKeys: rest.detachKeys
logs: rest.logs
stream: rest.stream
stdin: rest.stdin
stdout: rest.stdout
stderr: rest.stderr
outputParameters:
- type: object
mapping: $.
- path: /v1/containers/{id}/changes
name: containers-id-changes
description: REST surface for containers-id-changes.
operations:
- method: GET
name: containerchanges
description: Get changes on a container’s filesystem
call: docker-container.containerchanges
with:
id: rest.id
outputParameters:
- type: object
mapping: $.
- path: /v1/containers/{id}/export
name: containers-id-export
description: REST surface for containers-id-export.
operations:
- method: GET
name: containerexport
description: Export a container
call: docker-container.containerexport
with:
id: rest.id
outputParameters:
- type: object
mapping: $.
- path: /v1/containers/{id}/json
name: containers-id-json
description: REST surface for containers-id-json.
operations:
- method: GET
name: containerinspect
description: Inspect a container
call: docker-container.containerinspect
with:
id: rest.id
size: rest.size
outputParameters:
- type: object
mapping: $.
- path: /v1/containers/{id}/kill
name: containers-id-kill
description: REST surface for containers-id-kill.
operations:
- method: POST
name: containerkill
description: Kill a container
call: docker-container.containerkill
with:
id: rest.id
signal: rest.signal
outputParameters:
- type: object
mapping: $.
- path: /v1/containers/{id}/logs
name: containers-id-logs
description: REST surface for containers-id-logs.
operations:
- method: GET
name: containerlogs
description: Get container logs
call: docker-container.containerlogs
with:
id: rest.id
follow: rest.follow
stdout: rest.stdout
stderr: rest.stderr
since: rest.since
until: rest.until
timestamps: rest.timestamps
tail: rest.tail
outputParameters:
- type: object
mapping: $.
- path: /v1/containers/{id}/pause
name: containers-id-pause
description: REST surface for containers-id-pause.
operations:
- method: POST
name: containerpause
description: Pause a container
call: docker-container.containerpause
with:
id: rest.id
outputParameters:
- type: object
mapping: $.
- path: /v1/containers/{id}/rename
name: containers-id-rename
description: REST surface for containers-id-rename.
operations:
- method: POST
name: containerrename
description: Rename a container
call: docker-container.containerrename
with:
id: rest.id
name: rest.name
outputParameters:
- type: object
mapping: $.
- path: /v1/containers/{id}/resize
name: containers-id-resize
description: REST surface for containers-id-resize.
operations:
- method: POST
name: containerresize
description: Resize a container TTY
call: docker-container.containerresize
with:
id: rest.id
h: rest.h
w: rest.w
outputParameters:
- type: object
mapping: $.
- path: /v1/containers/{id}/restart
name: containers-id-restart
description: REST surface for containers-id-restart.
operations:
- method: POST
name: containerrestart
description: Restart a container
call: docker-container.containerrestart
with:
id: rest.id
signal: rest.signal
t: rest.t
outputParameters:
- type: object
mapping: $.
- path: /v1/containers/{id}/start
name: containers-id-start
description: REST surface for containers-id-start.
operations:
- method: POST
name: containerstart
description: Start a container
call: docker-container.containerstart
with:
id: rest.id
detachKeys: rest.detachKeys
outputParameters:
- type: object
mapping: $.
- path: /v1/containers/{id}/stats
name: containers-id-stats
description: REST surface for containers-id-stats.
operations:
- method: GET
name: containerstats
description: Get container stats based on resource usage
call: docker-container.containerstats
with:
id: rest.id
stream: rest.stream
one-shot: rest.one-shot
outputParameters:
- type: object
mapping: $.
- path: /v1/containers/{id}/stop
name: containers-id-stop
description: REST surface for containers-id-stop.
operations:
- method: POST
name: containerstop
description: Stop a container
call: docker-container.containerstop
with:
id: rest.id
signal: rest.signal
t: rest.t
outputParameters:
- type: object
mapping: $.
- path: /v1/containers/{id}/top
name: containers-id-top
description: REST surface for containers-id-top.
operations:
- method: GET
name: containertop
description: List processes running inside a container
call: docker-container.containertop
with:
id: rest.id
ps_args: rest.ps_args
outputParameters:
- type: object
mapping: $.
- path: /v1/containers/{id}/unpause
name: containers-id-unpause
description: REST surface for containers-id-unpause.
operations:
- method: POST
name: containerunpause
description: Unpause a container
call: docker-container.containerunpause
with:
id: rest.id
outputParameters:
- type: object
mapping: $.
- path: /v1/containers/{id}/update
name: containers-id-update
description: REST surface for containers-id-update.
operations:
- method: POST
name: containerupdate
description: Update a container
call: docker-container.containerupdate
with:
id: rest.id
update: rest.update
outputParameters:
- type: object
mapping: $.
- path: /v1/containers/{id}/wait
name: containers-id-wait
description: REST surface for containers-id-wait.
operations:
- method: POST
name: containerwait
description: Wait for a container
call: docker-container.containerwait
with:
id: rest.id
condition: rest.condition
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: docker-container-mcp
port: 9090
transport: http
description: MCP adapter for Docker Engine API — Container. One tool per consumed operation, routed inline through this
capability's consumes block.
tools:
- name: create-container
description: Create a container
hints:
readOnly: false
destructive: false
idempotent: false
call: docker-container.containercreate
with:
name: tools.name
platform: tools.platform
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: list-containers
description: List containers
hints:
readOnly: true
destructive: false
idempotent: true
call: docker-container.containerlist
with:
all: tools.all
limit: tools.limit
size: tools.size
filters: tools.filters
outputParameters:
- type: object
mapping: $.
- name: delete-stopped-containers
description: Delete stopped containers
hints:
readOnly: false
destructive: false
idempotent: false
call: docker-container.containerprune
with:
filters: tools.filters
outputParameters:
- type: object
mapping: $.
- name: remove-container
description: Remove a container
hints:
readOnly: false
destructive: true
idempotent: true
call: docker-container.containerdelete
with:
id: tools.id
v: tools.v
force: tools.force
link: tools.link
outputParameters:
- type: object
mapping: $.
- name: get-information-about-files-container
description: Get information about files in a container
hints:
readOnly: false
destructive: false
idempotent: false
call: docker-container.containerarchiveinfo
with:
id: tools.id
path: tools.path
outputParameters:
- type: object
mapping: $.
- name: get-archive-filesystem-resource-container
description: Get an archive of a filesystem resource in a container
hints:
readOnly: true
destructive: false
idempotent: true
call: docker-container.containerarchive
with:
id: tools.id
path: tools.path
outputParameters:
-
# --- truncated at 32 KB (38 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/docker/refs/heads/main/capabilities/docker-container.yaml