Image
Create a new image from a container
post/commit
Request
- Base URL/v1.49 (relative, and the document was published on a file host, not at the API’s origin)
- URL/v1.49/commit
- Authnone declared
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
Changes
No recorded changes to this operation across all 4 revisions of this API.