As discussed in https://github.com/docker/docker/issues/16623,
the API calls for setting ENV-vars lacked an actual example.
This PR adds some examples to the API calls.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -133,7 +133,10 @@ Create a container |
| 133 | 133 |
"Tty": false, |
| 134 | 134 |
"OpenStdin": false, |
| 135 | 135 |
"StdinOnce": false, |
| 136 |
- "Env": null, |
|
| 136 |
+ "Env": [ |
|
| 137 |
+ "FOO=bar", |
|
| 138 |
+ "BAZ=quux" |
|
| 139 |
+ ], |
|
| 137 | 140 |
"Cmd": [ |
| 138 | 141 |
"date" |
| 139 | 142 |
], |
| ... | ... |
@@ -196,7 +199,7 @@ Json Parameters: |
| 196 | 196 |
- **Tty** - Boolean value, Attach standard streams to a tty, including stdin if it is not closed. |
| 197 | 197 |
- **OpenStdin** - Boolean value, opens stdin, |
| 198 | 198 |
- **StdinOnce** - Boolean value, close stdin after the 1 attached client disconnects. |
| 199 |
-- **Env** - A list of environment variables in the form of `VAR=value` |
|
| 199 |
+- **Env** - A list of environment variables in the form of `["VAR=value"[,"VAR2=value2"]]` |
|
| 200 | 200 |
- **Cmd** - Command to run specified as a string or an array of strings. |
| 201 | 201 |
- **Entrypoint** - Set the entrypoint for the container a string or an array |
| 202 | 202 |
of strings |
| ... | ... |
@@ -133,7 +133,10 @@ Create a container |
| 133 | 133 |
"Tty": false, |
| 134 | 134 |
"OpenStdin": false, |
| 135 | 135 |
"StdinOnce": false, |
| 136 |
- "Env": null, |
|
| 136 |
+ "Env": [ |
|
| 137 |
+ "FOO=bar", |
|
| 138 |
+ "BAZ=quux" |
|
| 139 |
+ ], |
|
| 137 | 140 |
"Cmd": [ |
| 138 | 141 |
"date" |
| 139 | 142 |
], |
| ... | ... |
@@ -196,7 +199,7 @@ Json Parameters: |
| 196 | 196 |
- **Tty** - Boolean value, Attach standard streams to a tty, including stdin if it is not closed. |
| 197 | 197 |
- **OpenStdin** - Boolean value, opens stdin, |
| 198 | 198 |
- **StdinOnce** - Boolean value, close stdin after the 1 attached client disconnects. |
| 199 |
-- **Env** - A list of environment variables in the form of `VAR=value` |
|
| 199 |
+- **Env** - A list of environment variables in the form of `["VAR=value"[,"VAR2=value2"]]` |
|
| 200 | 200 |
- **Cmd** - Command to run specified as a string or an array of strings. |
| 201 | 201 |
- **Entrypoint** - Set the entrypoint for the container a string or an array |
| 202 | 202 |
of strings |
| ... | ... |
@@ -133,7 +133,10 @@ Create a container |
| 133 | 133 |
"Tty": false, |
| 134 | 134 |
"OpenStdin": false, |
| 135 | 135 |
"StdinOnce": false, |
| 136 |
- "Env": null, |
|
| 136 |
+ "Env": [ |
|
| 137 |
+ "FOO=bar", |
|
| 138 |
+ "BAZ=quux" |
|
| 139 |
+ ], |
|
| 137 | 140 |
"Cmd": [ |
| 138 | 141 |
"date" |
| 139 | 142 |
], |
| ... | ... |
@@ -198,7 +201,7 @@ Json Parameters: |
| 198 | 198 |
- **Tty** - Boolean value, Attach standard streams to a tty, including stdin if it is not closed. |
| 199 | 199 |
- **OpenStdin** - Boolean value, opens stdin, |
| 200 | 200 |
- **StdinOnce** - Boolean value, close stdin after the 1 attached client disconnects. |
| 201 |
-- **Env** - A list of environment variables in the form of `VAR=value` |
|
| 201 |
+- **Env** - A list of environment variables in the form of `["VAR=value"[,"VAR2=value2"]]` |
|
| 202 | 202 |
- **Cmd** - Command to run specified as a string or an array of strings. |
| 203 | 203 |
- **Entrypoint** - Set the entrypoint for the container a string or an array |
| 204 | 204 |
of strings |
| ... | ... |
@@ -138,7 +138,10 @@ Create a container |
| 138 | 138 |
"Tty": false, |
| 139 | 139 |
"OpenStdin": false, |
| 140 | 140 |
"StdinOnce": false, |
| 141 |
- "Env": null, |
|
| 141 |
+ "Env": [ |
|
| 142 |
+ "FOO=bar", |
|
| 143 |
+ "BAZ=quux" |
|
| 144 |
+ ], |
|
| 142 | 145 |
"Cmd": [ |
| 143 | 146 |
"date" |
| 144 | 147 |
], |
| ... | ... |
@@ -216,7 +219,7 @@ Json Parameters: |
| 216 | 216 |
- **Tty** - Boolean value, Attach standard streams to a tty, including stdin if it is not closed. |
| 217 | 217 |
- **OpenStdin** - Boolean value, opens stdin, |
| 218 | 218 |
- **StdinOnce** - Boolean value, close stdin after the 1 attached client disconnects. |
| 219 |
-- **Env** - A list of environment variables in the form of `VAR=value` |
|
| 219 |
+- **Env** - A list of environment variables in the form of `["VAR=value"[,"VAR2=value2"]]` |
|
| 220 | 220 |
- **Labels** - Adds a map of labels that to a container. To specify a map: `{"key":"value"[,"key2":"value2"]}`
|
| 221 | 221 |
- **Cmd** - Command to run specified as a string or an array of strings. |
| 222 | 222 |
- **Entrypoint** - Set the entrypoint for the container a string or an array |
| ... | ... |
@@ -140,7 +140,10 @@ Create a container |
| 140 | 140 |
"Tty": false, |
| 141 | 141 |
"OpenStdin": false, |
| 142 | 142 |
"StdinOnce": false, |
| 143 |
- "Env": null, |
|
| 143 |
+ "Env": [ |
|
| 144 |
+ "FOO=bar", |
|
| 145 |
+ "BAZ=quux" |
|
| 146 |
+ ], |
|
| 144 | 147 |
"Cmd": [ |
| 145 | 148 |
"date" |
| 146 | 149 |
], |
| ... | ... |
@@ -228,7 +231,7 @@ Json Parameters: |
| 228 | 228 |
- **Tty** - Boolean value, Attach standard streams to a `tty`, including `stdin` if it is not closed. |
| 229 | 229 |
- **OpenStdin** - Boolean value, opens stdin, |
| 230 | 230 |
- **StdinOnce** - Boolean value, close `stdin` after the 1 attached client disconnects. |
| 231 |
-- **Env** - A list of environment variables in the form of `VAR=value` |
|
| 231 |
+- **Env** - A list of environment variables in the form of `["VAR=value"[,"VAR2=value2"]]` |
|
| 232 | 232 |
- **Labels** - Adds a map of labels to a container. To specify a map: `{"key":"value"[,"key2":"value2"]}`
|
| 233 | 233 |
- **Cmd** - Command to run specified as a string or an array of strings. |
| 234 | 234 |
- **Entrypoint** - Set the entry point for the container as a string or an array |
| ... | ... |
@@ -140,7 +140,10 @@ Create a container |
| 140 | 140 |
"Tty": false, |
| 141 | 141 |
"OpenStdin": false, |
| 142 | 142 |
"StdinOnce": false, |
| 143 |
- "Env": null, |
|
| 143 |
+ "Env": [ |
|
| 144 |
+ "FOO=bar", |
|
| 145 |
+ "BAZ=quux" |
|
| 146 |
+ ], |
|
| 144 | 147 |
"Cmd": [ |
| 145 | 148 |
"date" |
| 146 | 149 |
], |
| ... | ... |
@@ -235,7 +238,7 @@ Json Parameters: |
| 235 | 235 |
- **Tty** - Boolean value, Attach standard streams to a `tty`, including `stdin` if it is not closed. |
| 236 | 236 |
- **OpenStdin** - Boolean value, opens stdin, |
| 237 | 237 |
- **StdinOnce** - Boolean value, close `stdin` after the 1 attached client disconnects. |
| 238 |
-- **Env** - A list of environment variables in the form of `VAR=value` |
|
| 238 |
+- **Env** - A list of environment variables in the form of `["VAR=value"[,"VAR2=value2"]]` |
|
| 239 | 239 |
- **Labels** - Adds a map of labels to a container. To specify a map: `{"key":"value"[,"key2":"value2"]}`
|
| 240 | 240 |
- **Cmd** - Command to run specified as a string or an array of strings. |
| 241 | 241 |
- **Entrypoint** - Set the entry point for the container as a string or an array |
| ... | ... |
@@ -144,7 +144,10 @@ Create a container |
| 144 | 144 |
"Tty": false, |
| 145 | 145 |
"OpenStdin": false, |
| 146 | 146 |
"StdinOnce": false, |
| 147 |
- "Env": null, |
|
| 147 |
+ "Env": [ |
|
| 148 |
+ "FOO=bar", |
|
| 149 |
+ "BAZ=quux" |
|
| 150 |
+ ], |
|
| 148 | 151 |
"Cmd": [ |
| 149 | 152 |
"date" |
| 150 | 153 |
], |
| ... | ... |
@@ -246,7 +249,7 @@ Json Parameters: |
| 246 | 246 |
- **Tty** - Boolean value, Attach standard streams to a `tty`, including `stdin` if it is not closed. |
| 247 | 247 |
- **OpenStdin** - Boolean value, opens stdin, |
| 248 | 248 |
- **StdinOnce** - Boolean value, close `stdin` after the 1 attached client disconnects. |
| 249 |
-- **Env** - A list of environment variables in the form of `VAR=value` |
|
| 249 |
+- **Env** - A list of environment variables in the form of `["VAR=value"[,"VAR2=value2"]]` |
|
| 250 | 250 |
- **Labels** - Adds a map of labels to a container. To specify a map: `{"key":"value"[,"key2":"value2"]}`
|
| 251 | 251 |
- **Cmd** - Command to run specified as a string or an array of strings. |
| 252 | 252 |
- **Entrypoint** - Set the entry point for the container as a string or an array |
| ... | ... |
@@ -145,7 +145,10 @@ Create a container |
| 145 | 145 |
"Tty": false, |
| 146 | 146 |
"OpenStdin": false, |
| 147 | 147 |
"StdinOnce": false, |
| 148 |
- "Env": null, |
|
| 148 |
+ "Env": [ |
|
| 149 |
+ "FOO=bar", |
|
| 150 |
+ "BAZ=quux" |
|
| 151 |
+ ], |
|
| 149 | 152 |
"Cmd": [ |
| 150 | 153 |
"date" |
| 151 | 154 |
], |
| ... | ... |
@@ -247,7 +250,7 @@ Json Parameters: |
| 247 | 247 |
- **Tty** - Boolean value, Attach standard streams to a `tty`, including `stdin` if it is not closed. |
| 248 | 248 |
- **OpenStdin** - Boolean value, opens stdin, |
| 249 | 249 |
- **StdinOnce** - Boolean value, close `stdin` after the 1 attached client disconnects. |
| 250 |
-- **Env** - A list of environment variables in the form of `VAR=value` |
|
| 250 |
+- **Env** - A list of environment variables in the form of `["VAR=value"[,"VAR2=value2"]]` |
|
| 251 | 251 |
- **Labels** - Adds a map of labels to a container. To specify a map: `{"key":"value"[,"key2":"value2"]}`
|
| 252 | 252 |
- **Cmd** - Command to run specified as a string or an array of strings. |
| 253 | 253 |
- **Entrypoint** - Set the entry point for the container as a string or an array |