Skip to content

Commit bba1dd0

Browse files
author
Andy Goldstein
committedApr 28, 2014
Docs fix: correct /commit info
Correct documentation for POST /commit to reflect that the container's configuration is supplied in the request body, and not as a query parameter. Also correct a small typo in the example JSON for create container. Docker-DCO-1.1-Signed-off-by: Andy Goldstein <[email protected]> (github: ncdc)
1 parent 425b315 commit bba1dd0

File tree

4 files changed

+101
-7
lines changed

4 files changed

+101
-7
lines changed
 

‎AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Andrew Munsell <andrew@wizardapps.net>
2020
Andrews Medina <andrewsmedina@gmail.com>
2121
Andy Chambers <anchambers@paypal.com>
2222
andy diller <dillera@gmail.com>
23+
Andy Goldstein <agoldste@redhat.com>
2324
Andy Rothfusz <github@metaliveblog.com>
2425
Andy Smith <github@anarkystic.com>
2526
Anthony Bishopric <git@anthonybishopric.com>

‎docs/sources/reference/api/docker_remote_api_v1.10.md

+34-3
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ Create a container
131131
"WorkingDir":"",
132132
"DisableNetwork": false,
133133
"ExposedPorts":{
134-
"DisableNetwork": false,
135134
"22/tcp": {}
136135
}
137136
}
@@ -1132,6 +1131,33 @@ Create a new image from a container's changes
11321131
**Example request**:
11331132

11341133
POST /commit?container=44c004db4b17&m=message&repo=myrepo HTTP/1.1
1134+
Content-Type: application/json
1135+
1136+
{
1137+
"Hostname":"",
1138+
"User":"",
1139+
"Memory":0,
1140+
"MemorySwap":0,
1141+
"AttachStdin":false,
1142+
"AttachStdout":true,
1143+
"AttachStderr":true,
1144+
"PortSpecs":null,
1145+
"Tty":false,
1146+
"OpenStdin":false,
1147+
"StdinOnce":false,
1148+
"Env":null,
1149+
"Cmd":[
1150+
"date"
1151+
],
1152+
"Volumes":{
1153+
"/tmp": {}
1154+
},
1155+
"WorkingDir":"",
1156+
"DisableNetwork": false,
1157+
"ExposedPorts":{
1158+
"22/tcp": {}
1159+
}
1160+
}
11351161

11361162
**Example response**:
11371163

@@ -1140,6 +1166,13 @@ Create a new image from a container's changes
11401166

11411167
{"Id":"596069db4bf5"}
11421168

1169+
1170+
Json Parameters:
1171+
1172+
1173+
1174+
- **config** - the container's configuration
1175+
11431176
Query Parameters:
11441177

11451178
 
@@ -1150,8 +1183,6 @@ Create a new image from a container's changes
11501183
- **m** – commit message
11511184
- **author** – author (eg. "John Hannibal Smith
11521185
<[hannibal@a-team.com](mailto:hannibal%40a-team.com)>")
1153-
- **run** – config automatically applied when the image is run.
1154-
(ex: {"Cmd": ["cat", "/world"], "PortSpecs":["22"]})
11551186

11561187
Status Codes:
11571188

‎docs/sources/reference/api/docker_remote_api_v1.11.md

+33-2
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,33 @@ Create a new image from a container's changes
11351135
**Example request**:
11361136

11371137
POST /commit?container=44c004db4b17&m=message&repo=myrepo HTTP/1.1
1138+
Content-Type: application/json
1139+
1140+
{
1141+
"Hostname":"",
1142+
"User":"",
1143+
"Memory":0,
1144+
"MemorySwap":0,
1145+
"AttachStdin":false,
1146+
"AttachStdout":true,
1147+
"AttachStderr":true,
1148+
"PortSpecs":null,
1149+
"Tty":false,
1150+
"OpenStdin":false,
1151+
"StdinOnce":false,
1152+
"Env":null,
1153+
"Cmd":[
1154+
"date"
1155+
],
1156+
"Volumes":{
1157+
"/tmp": {}
1158+
},
1159+
"WorkingDir":"",
1160+
"DisableNetwork": false,
1161+
"ExposedPorts":{
1162+
"22/tcp": {}
1163+
}
1164+
}
11381165

11391166
**Example response**:
11401167

@@ -1143,6 +1170,12 @@ Create a new image from a container's changes
11431170

11441171
{"Id":"596069db4bf5"}
11451172

1173+
Json Parameters:
1174+
1175+
1176+
1177+
- **config** - the container's configuration
1178+
11461179
Query Parameters:
11471180

11481181
 
@@ -1153,8 +1186,6 @@ Create a new image from a container's changes
11531186
- **m** – commit message
11541187
- **author** – author (eg. "John Hannibal Smith
11551188
<[hannibal@a-team.com](mailto:hannibal%40a-team.com)>")
1156-
- **run** – config automatically applied when the image is run.
1157-
(ex: {"Cmd": ["cat", "/world"], "PortSpecs":["22"]})
11581189

11591190
Status Codes:
11601191

‎docs/sources/reference/api/docker_remote_api_v1.9.md

+33-2
Original file line numberDiff line numberDiff line change
@@ -1146,6 +1146,33 @@ Create a new image from a container's changes
11461146
**Example request**:
11471147

11481148
POST /commit?container=44c004db4b17&m=message&repo=myrepo HTTP/1.1
1149+
Content-Type: application/json
1150+
1151+
{
1152+
"Hostname":"",
1153+
"User":"",
1154+
"Memory":0,
1155+
"MemorySwap":0,
1156+
"AttachStdin":false,
1157+
"AttachStdout":true,
1158+
"AttachStderr":true,
1159+
"PortSpecs":null,
1160+
"Tty":false,
1161+
"OpenStdin":false,
1162+
"StdinOnce":false,
1163+
"Env":null,
1164+
"Cmd":[
1165+
"date"
1166+
],
1167+
"Volumes":{
1168+
"/tmp": {}
1169+
},
1170+
"WorkingDir":"",
1171+
"DisableNetwork": false,
1172+
"ExposedPorts":{
1173+
"22/tcp": {}
1174+
}
1175+
}
11491176

11501177
**Example response**:
11511178

@@ -1154,6 +1181,12 @@ Create a new image from a container's changes
11541181

11551182
{"Id":"596069db4bf5"}
11561183

1184+
Json Parameters:
1185+
1186+
1187+
1188+
- **config** - the container's configuration
1189+
11571190
Query Parameters:
11581191

11591192
 
@@ -1164,8 +1197,6 @@ Create a new image from a container's changes
11641197
- **m** – commit message
11651198
- **author** – author (eg. "John Hannibal Smith
11661199
<[hannibal@a-team.com](mailto:hannibal%40a-team.com)>")
1167-
- **run** – config automatically applied when the image is run.
1168-
(ex: {"Cmd": ["cat", "/world"], "PortSpecs":["22"]})
11691200

11701201
Status Codes:
11711202

0 commit comments

Comments
 (0)
Please sign in to comment.