Browse code

docs: document some JSON parameters /containers/create and /containers/(id)/start in remote api (fixes #2948)

Docker-DCO-1.1-Signed-off-by: Manuel Woelker <github@manuel.woelker.org> (github: manuel-woelker)

Manuel Woelker authored on 2014/02/22 03:25:49
Showing 2 changed files
... ...
@@ -118,6 +118,7 @@ Create a container
118 118
                 "User":"",
119 119
                 "Memory":0,
120 120
                 "MemorySwap":0,
121
+                "CpuShares":0,
121 122
                 "AttachStdin":false,
122 123
                 "AttachStdout":true,
123 124
                 "AttachStderr":true,
... ...
@@ -153,7 +154,15 @@ Create a container
153 153
                 "Warnings":[]
154 154
            }
155 155
 
156
-        :jsonparam config: the container's configuration
156
+        :jsonparam Hostname: Container host name
157
+        :jsonparam User: Username or UID
158
+        :jsonparam Memory: Memory Limit in bytes
159
+        :jsonparam CpuShares: CPU shares (relative weight)
160
+        :jsonparam AttachStdin: 1/True/true or 0/False/false, attach to standard input. Default false
161
+        :jsonparam AttachStdout: 1/True/true or 0/False/false, attach to standard output. Default false
162
+        :jsonparam AttachStderr: 1/True/true or 0/False/false, attach to standard error. Default false
163
+        :jsonparam Tty: 1/True/true or 0/False/false, allocate a pseudo-tty. Default false
164
+        :jsonparam OpenStdin: 1/True/true or 0/False/false, keep stdin open even if not attached. Default false
157 165
         :query name: Assign the specified name to the container. Must match ``/?[a-zA-Z0-9_-]+``.
158 166
         :statuscode 201: no error
159 167
         :statuscode 404: no such container
... ...
@@ -394,7 +403,11 @@ Start a container
394 394
            HTTP/1.1 204 No Content
395 395
            Content-Type: text/plain
396 396
 
397
-        :jsonparam hostConfig: the container's host configuration (optional)
397
+        :jsonparam Binds: Create a bind mount to a directory or file with [host-path]:[container-path]:[rw|ro]. If a directory "container-path" is missing, then docker creates a new volume.
398
+        :jsonparam LxcConf: Map of custom lxc options
399
+        :jsonparam PortBindings: Expose ports from the container, optionally publishing them via the HostPort flag
400
+        :jsonparam PublishAllPorts: 1/True/true or 0/False/false, publish all exposed ports to the host interfaces. Default false
401
+        :jsonparam Privileged: 1/True/true or 0/False/false, give extended privileges to this container. Default false
398 402
         :statuscode 204: no error
399 403
         :statuscode 404: no such container
400 404
         :statuscode 500: server error
... ...
@@ -118,6 +118,7 @@ Create a container
118 118
                 "User":"",
119 119
                 "Memory":0,
120 120
                 "MemorySwap":0,
121
+                "CpuShares":0,
121 122
                 "AttachStdin":false,
122 123
                 "AttachStdout":true,
123 124
                 "AttachStderr":true,
... ...
@@ -153,7 +154,15 @@ Create a container
153 153
                 "Warnings":[]
154 154
            }
155 155
 
156
-        :jsonparam config: the container's configuration
156
+        :jsonparam Hostname: Container host name
157
+        :jsonparam User: Username or UID
158
+        :jsonparam Memory: Memory Limit in bytes
159
+        :jsonparam CpuShares: CPU shares (relative weight)
160
+        :jsonparam AttachStdin: 1/True/true or 0/False/false, attach to standard input. Default false
161
+        :jsonparam AttachStdout: 1/True/true or 0/False/false, attach to standard output. Default false
162
+        :jsonparam AttachStderr: 1/True/true or 0/False/false, attach to standard error. Default false
163
+        :jsonparam Tty: 1/True/true or 0/False/false, allocate a pseudo-tty. Default false
164
+        :jsonparam OpenStdin: 1/True/true or 0/False/false, keep stdin open even if not attached. Default false
157 165
         :query name: Assign the specified name to the container. Must match ``/?[a-zA-Z0-9_-]+``.
158 166
         :statuscode 201: no error
159 167
         :statuscode 404: no such container
... ...
@@ -394,7 +403,11 @@ Start a container
394 394
            HTTP/1.1 204 No Content
395 395
            Content-Type: text/plain
396 396
 
397
-        :jsonparam hostConfig: the container's host configuration (optional)
397
+        :jsonparam Binds: Create a bind mount to a directory or file with [host-path]:[container-path]:[rw|ro]. If a directory "container-path" is missing, then docker creates a new volume.
398
+        :jsonparam LxcConf: Map of custom lxc options
399
+        :jsonparam PortBindings: Expose ports from the container, optionally publishing them via the HostPort flag
400
+        :jsonparam PublishAllPorts: 1/True/true or 0/False/false, publish all exposed ports to the host interfaces. Default false
401
+        :jsonparam Privileged: 1/True/true or 0/False/false, give extended privileges to this container. Default false
398 402
         :statuscode 204: no error
399 403
         :statuscode 404: no such container
400 404
         :statuscode 500: server error