v1
latestSwagger 2.02026-07-17107129448.0 KBImage
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
Example request
{
"Hostname": "439f4e91bd1d",
"User": "123:456",
"ExposedPorts": {
"80/tcp": {},
"443/tcp": {}
},
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"/bin/sh"
],
"Image": "example-image:1.0",
"WorkingDir": "/public/",
"Entrypoint": [],
"OnBuild": [],
"Labels": {
"com.example.some-label": "some-value",
"com.example.some-other-label": "some-other-value"
},
"StopSignal": "SIGTERM",
"Shell": [
"/bin/sh",
"-c"
]
}Response
no error