v1

latestOpenAPI 3.0.02026-07-1410578280.2 KB
Image

Create a new image from a container

post/commit

Query parameters

containerstring

The ID or name of the container to commit

repostring

Repository name for the created image

tagstring

Tag name for the create image

commentstring

Commit message

authorstring

Author of the image (e.g., John Hannibal Smith <hannibal@a-team.com>)

pauseboolean

Whether to pause the container before committing

changesstring

Dockerfile instructions to apply while committing

Request body

ArgsEscapedboolean

Command is already escaped (Windows only)

AttachStderrboolean

Whether to attach to stderr.

AttachStdinboolean

Whether to attach to stdin.

AttachStdoutboolean

Whether to attach to stdout.

Domainnamestring

The domain name to use for the container.

Envstring[]

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.

ExposedPortsobject

An object mapping ports to an empty object in the form:

{"<port>/<tcp|udp>": {}}

Hostnamestring

The hostname to use for the container, as a valid RFC 1123 hostname.

Imagestring

The name of the image to use when creating the container

Labelsobject

User-defined key/value metadata.

MacAddressstring

MAC address of the container.

NetworkDisabledboolean

Disable networking for the container.

OnBuildstring[]

ONBUILD metadata that were defined in the image's Dockerfile.

OpenStdinboolean

Open stdin

Shellstring[]

Shell for when RUN, CMD, and ENTRYPOINT uses a shell.

StdinOnceboolean

Close stdin after one attached client disconnects

StopSignalstring

Signal to stop a container as a string or unsigned integer.

StopTimeoutinteger

Timeout to stop a container in seconds.

Ttyboolean

Attach standard streams to a TTY, including stdin if it is not closed.

Userstring

The user that commands are run as inside the container.

WorkingDirstring

The working directory for commands to run in.

Response

no error

Idstring required

The id of the newly created object.