Browse code

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 <agoldste@redhat.com> (github: ncdc)

Andy Goldstein authored on 2014/04/29 02:38:58
Showing 4 changed files
... ...
@@ -20,6 +20,7 @@ Andrew Munsell <andrew@wizardapps.net>
20 20
 Andrews Medina <andrewsmedina@gmail.com>
21 21
 Andy Chambers <anchambers@paypal.com>
22 22
 andy diller <dillera@gmail.com>
23
+Andy Goldstein <agoldste@redhat.com>
23 24
 Andy Rothfusz <github@metaliveblog.com>
24 25
 Andy Smith <github@anarkystic.com>
25 26
 Anthony Bishopric <git@anthonybishopric.com>
... ...
@@ -131,7 +131,6 @@ Create a container
131 131
              "WorkingDir":"",
132 132
              "DisableNetwork": false,
133 133
              "ExposedPorts":{
134
-             "DisableNetwork": false,
135 134
                      "22/tcp": {}
136 135
              }
137 136
         }
... ...
@@ -1132,6 +1131,33 @@ Create a new image from a container's changes
1132 1132
     **Example request**:
1133 1133
 
1134 1134
         POST /commit?container=44c004db4b17&m=message&repo=myrepo HTTP/1.1
1135
+        Content-Type: application/json
1136
+
1137
+        {
1138
+             "Hostname":"",
1139
+             "User":"",
1140
+             "Memory":0,
1141
+             "MemorySwap":0,
1142
+             "AttachStdin":false,
1143
+             "AttachStdout":true,
1144
+             "AttachStderr":true,
1145
+             "PortSpecs":null,
1146
+             "Tty":false,
1147
+             "OpenStdin":false,
1148
+             "StdinOnce":false,
1149
+             "Env":null,
1150
+             "Cmd":[
1151
+                     "date"
1152
+             ],
1153
+             "Volumes":{
1154
+                     "/tmp": {}
1155
+             },
1156
+             "WorkingDir":"",
1157
+             "DisableNetwork": false,
1158
+             "ExposedPorts":{
1159
+                     "22/tcp": {}
1160
+             }
1161
+        }
1135 1162
 
1136 1163
     **Example response**:
1137 1164
 
... ...
@@ -1140,6 +1166,13 @@ Create a new image from a container's changes
1140 1140
 
1141 1141
         {"Id":"596069db4bf5"}
1142 1142
 
1143
+
1144
+    Json Parameters:
1145
+
1146
+
1147
+
1148
+    -  **config** - the container's configuration
1149
+
1143 1150
     Query Parameters:
1144 1151
 
1145 1152
      
... ...
@@ -1150,8 +1183,6 @@ Create a new image from a container's changes
1150 1150
     -   **m** – commit message
1151 1151
     -   **author** – author (eg. "John Hannibal Smith
1152 1152
         <[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"]})
1155 1153
 
1156 1154
     Status Codes:
1157 1155
 
... ...
@@ -1135,6 +1135,33 @@ Create a new image from a container's changes
1135 1135
     **Example request**:
1136 1136
 
1137 1137
         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
+        }
1138 1165
 
1139 1166
     **Example response**:
1140 1167
 
... ...
@@ -1143,6 +1170,12 @@ Create a new image from a container's changes
1143 1143
 
1144 1144
         {"Id":"596069db4bf5"}
1145 1145
 
1146
+    Json Parameters:
1147
+
1148
+
1149
+
1150
+    -  **config** - the container's configuration
1151
+
1146 1152
     Query Parameters:
1147 1153
 
1148 1154
      
... ...
@@ -1153,8 +1186,6 @@ Create a new image from a container's changes
1153 1153
     -   **m** – commit message
1154 1154
     -   **author** – author (eg. "John Hannibal Smith
1155 1155
         <[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"]})
1158 1156
 
1159 1157
     Status Codes:
1160 1158
 
... ...
@@ -1146,6 +1146,33 @@ Create a new image from a container's changes
1146 1146
     **Example request**:
1147 1147
 
1148 1148
         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
+        }
1149 1176
 
1150 1177
     **Example response**:
1151 1178
 
... ...
@@ -1154,6 +1181,12 @@ Create a new image from a container's changes
1154 1154
 
1155 1155
         {"Id":"596069db4bf5"}
1156 1156
 
1157
+    Json Parameters:
1158
+
1159
+
1160
+
1161
+    -  **config** - the container's configuration
1162
+
1157 1163
     Query Parameters:
1158 1164
 
1159 1165
      
... ...
@@ -1164,8 +1197,6 @@ Create a new image from a container's changes
1164 1164
     -   **m** – commit message
1165 1165
     -   **author** – author (eg. "John Hannibal Smith
1166 1166
         <[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"]})
1169 1167
 
1170 1168
     Status Codes:
1171 1169