1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Add examples for ENV vars in API

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>
This commit is contained in:
Sebastiaan van Stijn 2015-11-02 15:53:34 +01:00
parent 38d3fc00d3
commit e41de3e631
9 changed files with 44 additions and 17 deletions

View file

@ -126,7 +126,10 @@ Create a container
"Tty":false,
"OpenStdin":false,
"StdinOnce":false,
"Env":null,
"Env": [
"FOO=bar",
"BAZ=quux"
],
"Cmd":[
"date"
],

View file

@ -133,7 +133,10 @@ Create a container
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": null,
"Env": [
"FOO=bar",
"BAZ=quux"
],
"Cmd": [
"date"
],
@ -196,7 +199,7 @@ Json Parameters:
- **Tty** - Boolean value, Attach standard streams to a tty, including stdin if it is not closed.
- **OpenStdin** - Boolean value, opens stdin,
- **StdinOnce** - Boolean value, close stdin after the 1 attached client disconnects.
- **Env** - A list of environment variables in the form of `VAR=value`
- **Env** - A list of environment variables in the form of `["VAR=value"[,"VAR2=value2"]]`
- **Cmd** - Command to run specified as a string or an array of strings.
- **Entrypoint** - Set the entrypoint for the container a string or an array
of strings

View file

@ -133,7 +133,10 @@ Create a container
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": null,
"Env": [
"FOO=bar",
"BAZ=quux"
],
"Cmd": [
"date"
],
@ -196,7 +199,7 @@ Json Parameters:
- **Tty** - Boolean value, Attach standard streams to a tty, including stdin if it is not closed.
- **OpenStdin** - Boolean value, opens stdin,
- **StdinOnce** - Boolean value, close stdin after the 1 attached client disconnects.
- **Env** - A list of environment variables in the form of `VAR=value`
- **Env** - A list of environment variables in the form of `["VAR=value"[,"VAR2=value2"]]`
- **Cmd** - Command to run specified as a string or an array of strings.
- **Entrypoint** - Set the entrypoint for the container a string or an array
of strings

View file

@ -133,7 +133,10 @@ Create a container
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": null,
"Env": [
"FOO=bar",
"BAZ=quux"
],
"Cmd": [
"date"
],
@ -198,7 +201,7 @@ Json Parameters:
- **Tty** - Boolean value, Attach standard streams to a tty, including stdin if it is not closed.
- **OpenStdin** - Boolean value, opens stdin,
- **StdinOnce** - Boolean value, close stdin after the 1 attached client disconnects.
- **Env** - A list of environment variables in the form of `VAR=value`
- **Env** - A list of environment variables in the form of `["VAR=value"[,"VAR2=value2"]]`
- **Cmd** - Command to run specified as a string or an array of strings.
- **Entrypoint** - Set the entrypoint for the container a string or an array
of strings

View file

@ -138,7 +138,10 @@ Create a container
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": null,
"Env": [
"FOO=bar",
"BAZ=quux"
],
"Cmd": [
"date"
],
@ -216,7 +219,7 @@ Json Parameters:
- **Tty** - Boolean value, Attach standard streams to a tty, including stdin if it is not closed.
- **OpenStdin** - Boolean value, opens stdin,
- **StdinOnce** - Boolean value, close stdin after the 1 attached client disconnects.
- **Env** - A list of environment variables in the form of `VAR=value`
- **Env** - A list of environment variables in the form of `["VAR=value"[,"VAR2=value2"]]`
- **Labels** - Adds a map of labels that to a container. To specify a map: `{"key":"value"[,"key2":"value2"]}`
- **Cmd** - Command to run specified as a string or an array of strings.
- **Entrypoint** - Set the entrypoint for the container a string or an array

View file

@ -140,7 +140,10 @@ Create a container
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": null,
"Env": [
"FOO=bar",
"BAZ=quux"
],
"Cmd": [
"date"
],
@ -228,7 +231,7 @@ Json Parameters:
- **Tty** - Boolean value, Attach standard streams to a `tty`, including `stdin` if it is not closed.
- **OpenStdin** - Boolean value, opens stdin,
- **StdinOnce** - Boolean value, close `stdin` after the 1 attached client disconnects.
- **Env** - A list of environment variables in the form of `VAR=value`
- **Env** - A list of environment variables in the form of `["VAR=value"[,"VAR2=value2"]]`
- **Labels** - Adds a map of labels to a container. To specify a map: `{"key":"value"[,"key2":"value2"]}`
- **Cmd** - Command to run specified as a string or an array of strings.
- **Entrypoint** - Set the entry point for the container as a string or an array

View file

@ -140,7 +140,10 @@ Create a container
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": null,
"Env": [
"FOO=bar",
"BAZ=quux"
],
"Cmd": [
"date"
],
@ -235,7 +238,7 @@ Json Parameters:
- **Tty** - Boolean value, Attach standard streams to a `tty`, including `stdin` if it is not closed.
- **OpenStdin** - Boolean value, opens stdin,
- **StdinOnce** - Boolean value, close `stdin` after the 1 attached client disconnects.
- **Env** - A list of environment variables in the form of `VAR=value`
- **Env** - A list of environment variables in the form of `["VAR=value"[,"VAR2=value2"]]`
- **Labels** - Adds a map of labels to a container. To specify a map: `{"key":"value"[,"key2":"value2"]}`
- **Cmd** - Command to run specified as a string or an array of strings.
- **Entrypoint** - Set the entry point for the container as a string or an array

View file

@ -144,7 +144,10 @@ Create a container
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": null,
"Env": [
"FOO=bar",
"BAZ=quux"
],
"Cmd": [
"date"
],
@ -246,7 +249,7 @@ Json Parameters:
- **Tty** - Boolean value, Attach standard streams to a `tty`, including `stdin` if it is not closed.
- **OpenStdin** - Boolean value, opens stdin,
- **StdinOnce** - Boolean value, close `stdin` after the 1 attached client disconnects.
- **Env** - A list of environment variables in the form of `VAR=value`
- **Env** - A list of environment variables in the form of `["VAR=value"[,"VAR2=value2"]]`
- **Labels** - Adds a map of labels to a container. To specify a map: `{"key":"value"[,"key2":"value2"]}`
- **Cmd** - Command to run specified as a string or an array of strings.
- **Entrypoint** - Set the entry point for the container as a string or an array

View file

@ -145,7 +145,10 @@ Create a container
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": null,
"Env": [
"FOO=bar",
"BAZ=quux"
],
"Cmd": [
"date"
],
@ -247,7 +250,7 @@ Json Parameters:
- **Tty** - Boolean value, Attach standard streams to a `tty`, including `stdin` if it is not closed.
- **OpenStdin** - Boolean value, opens stdin,
- **StdinOnce** - Boolean value, close `stdin` after the 1 attached client disconnects.
- **Env** - A list of environment variables in the form of `VAR=value`
- **Env** - A list of environment variables in the form of `["VAR=value"[,"VAR2=value2"]]`
- **Labels** - Adds a map of labels to a container. To specify a map: `{"key":"value"[,"key2":"value2"]}`
- **Cmd** - Command to run specified as a string or an array of strings.
- **Entrypoint** - Set the entry point for the container as a string or an array