mirror of https://github.com/docker/docs.git
Updated example to examples in yaml
Signed-off-by: French Ben <frenchben@docker.com>
This commit is contained in:
parent
ff0e184ef3
commit
7c894d5fb1
|
@ -64,7 +64,7 @@ options:
|
||||||
- option: sig-proxy
|
- option: sig-proxy
|
||||||
default_value: "true"
|
default_value: "true"
|
||||||
description: Proxy all received signals to the process
|
description: Proxy all received signals to the process
|
||||||
example: |-
|
examples: |-
|
||||||
### Attach to and detach from a running container
|
### Attach to and detach from a running container
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -184,7 +184,7 @@ options:
|
||||||
- option: ulimit
|
- option: ulimit
|
||||||
default_value: '[]'
|
default_value: '[]'
|
||||||
description: Ulimit options
|
description: Ulimit options
|
||||||
example: |-
|
examples: |-
|
||||||
### Build with PATH
|
### Build with PATH
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -36,7 +36,7 @@ options:
|
||||||
shorthand: p
|
shorthand: p
|
||||||
default_value: "true"
|
default_value: "true"
|
||||||
description: Pause container during commit
|
description: Pause container during commit
|
||||||
example: |-
|
examples: |-
|
||||||
### Commit a container
|
### Commit a container
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -291,7 +291,7 @@ options:
|
||||||
- option: workdir
|
- option: workdir
|
||||||
shorthand: w
|
shorthand: w
|
||||||
description: Working directory inside the container
|
description: Working directory inside the container
|
||||||
example: |-
|
examples: |-
|
||||||
### Create and start a container
|
### Create and start a container
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -15,7 +15,7 @@ options:
|
||||||
- option: with-registry-auth
|
- option: with-registry-auth
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Send registry authentication details to Swarm agents
|
description: Send registry authentication details to Swarm agents
|
||||||
example: |-
|
examples: |-
|
||||||
### Compose file
|
### Compose file
|
||||||
|
|
||||||
The `deploy` command supports compose file version `3.0` and above.
|
The `deploy` command supports compose file version `3.0` and above.
|
||||||
|
|
|
@ -15,7 +15,7 @@ long: |-
|
||||||
usage: docker diff CONTAINER
|
usage: docker diff CONTAINER
|
||||||
pname: docker
|
pname: docker
|
||||||
plink: docker.yaml
|
plink: docker.yaml
|
||||||
example: |-
|
examples: |-
|
||||||
Inspect the changes to an `nginx` container:
|
Inspect the changes to an `nginx` container:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -145,7 +145,7 @@ options:
|
||||||
description: Show all events created since timestamp
|
description: Show all events created since timestamp
|
||||||
- option: until
|
- option: until
|
||||||
description: Stream events until this timestamp
|
description: Stream events until this timestamp
|
||||||
example: |-
|
examples: |-
|
||||||
### Basic example
|
### Basic example
|
||||||
|
|
||||||
You'll need two shells for this example.
|
You'll need two shells for this example.
|
||||||
|
|
|
@ -34,7 +34,7 @@ options:
|
||||||
- option: user
|
- option: user
|
||||||
shorthand: u
|
shorthand: u
|
||||||
description: 'Username or UID (format: <name|uid>[:<group|gid>])'
|
description: 'Username or UID (format: <name|uid>[:<group|gid>])'
|
||||||
example: |-
|
examples: |-
|
||||||
### Run `docker exec` on a running container
|
### Run `docker exec` on a running container
|
||||||
|
|
||||||
First, start a container.
|
First, start a container.
|
||||||
|
|
|
@ -15,7 +15,7 @@ options:
|
||||||
- option: output
|
- option: output
|
||||||
shorthand: o
|
shorthand: o
|
||||||
description: Write to a file, instead of STDOUT
|
description: Write to a file, instead of STDOUT
|
||||||
example: |-
|
examples: |-
|
||||||
ch of these commands has the same result.
|
ch of these commands has the same result.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -16,7 +16,7 @@ options:
|
||||||
shorthand: q
|
shorthand: q
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Only show numeric IDs
|
description: Only show numeric IDs
|
||||||
example: |-
|
examples: |-
|
||||||
To see how the `docker:latest` image was built:
|
To see how the `docker:latest` image was built:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -39,7 +39,7 @@ options:
|
||||||
shorthand: q
|
shorthand: q
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Only show numeric IDs
|
description: Only show numeric IDs
|
||||||
example: |-
|
examples: |-
|
||||||
### List the most recently created images
|
### List the most recently created images
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -24,7 +24,7 @@ options:
|
||||||
- option: message
|
- option: message
|
||||||
shorthand: m
|
shorthand: m
|
||||||
description: Set commit message for imported image
|
description: Set commit message for imported image
|
||||||
example: |-
|
examples: |-
|
||||||
### Import from a remote location
|
### Import from a remote location
|
||||||
|
|
||||||
This will create a new untagged image.
|
This will create a new untagged image.
|
||||||
|
|
|
@ -25,7 +25,7 @@ options:
|
||||||
- option: format
|
- option: format
|
||||||
shorthand: f
|
shorthand: f
|
||||||
description: Format the output using the given Go template
|
description: Format the output using the given Go template
|
||||||
example: |-
|
examples: |-
|
||||||
### Show output
|
### Show output
|
||||||
|
|
||||||
The example below shows the output for a daemon running on Red Hat Enterprise Linux,
|
The example below shows the output for a daemon running on Red Hat Enterprise Linux,
|
||||||
|
|
|
@ -20,7 +20,7 @@ options:
|
||||||
description: Display total file sizes if the type is container
|
description: Display total file sizes if the type is container
|
||||||
- option: type
|
- option: type
|
||||||
description: Return JSON for specified type
|
description: Return JSON for specified type
|
||||||
example: |-
|
examples: |-
|
||||||
### Get an instance's IP address
|
### Get an instance's IP address
|
||||||
|
|
||||||
For the most part, you can pick out any field from the JSON in a fairly
|
For the most part, you can pick out any field from the JSON in a fairly
|
||||||
|
|
|
@ -14,7 +14,7 @@ options:
|
||||||
shorthand: q
|
shorthand: q
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Suppress the load output
|
description: Suppress the load output
|
||||||
example: |-
|
examples: |-
|
||||||
```bash
|
```bash
|
||||||
$ docker images
|
$ docker images
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ long: Log out from a Docker registry
|
||||||
usage: docker logout [SERVER]
|
usage: docker logout [SERVER]
|
||||||
pname: docker
|
pname: docker
|
||||||
plink: docker.yaml
|
plink: docker.yaml
|
||||||
example: |-
|
examples: |-
|
||||||
```bash
|
```bash
|
||||||
$ docker logout localhost:8080
|
$ docker logout localhost:8080
|
||||||
```
|
```
|
||||||
|
|
|
@ -14,7 +14,7 @@ long: |-
|
||||||
usage: docker pause CONTAINER [CONTAINER...]
|
usage: docker pause CONTAINER [CONTAINER...]
|
||||||
pname: docker
|
pname: docker
|
||||||
plink: docker.yaml
|
plink: docker.yaml
|
||||||
example: |-
|
examples: |-
|
||||||
```bash
|
```bash
|
||||||
$ docker pause my_container
|
$ docker pause my_container
|
||||||
```
|
```
|
||||||
|
|
|
@ -4,7 +4,7 @@ long: List port mappings or a specific mapping for the container
|
||||||
usage: docker port CONTAINER [PRIVATE_PORT[/PROTO]]
|
usage: docker port CONTAINER [PRIVATE_PORT[/PROTO]]
|
||||||
pname: docker
|
pname: docker
|
||||||
plink: docker.yaml
|
plink: docker.yaml
|
||||||
example: |-
|
examples: |-
|
||||||
### Show all mapped ports
|
### Show all mapped ports
|
||||||
|
|
||||||
You can find out all the ports mapped by not specifying a `PRIVATE_PORT`, or
|
You can find out all the ports mapped by not specifying a `PRIVATE_PORT`, or
|
||||||
|
|
|
@ -33,7 +33,7 @@ options:
|
||||||
shorthand: s
|
shorthand: s
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Display total file sizes
|
description: Display total file sizes
|
||||||
example: |-
|
examples: |-
|
||||||
### Prevent truncating output
|
### Prevent truncating output
|
||||||
|
|
||||||
Running `docker ps --no-trunc` showing 2 linked containers.
|
Running `docker ps --no-trunc` showing 2 linked containers.
|
||||||
|
|
|
@ -36,7 +36,7 @@ options:
|
||||||
- option: disable-content-trust
|
- option: disable-content-trust
|
||||||
default_value: "true"
|
default_value: "true"
|
||||||
description: Skip image verification
|
description: Skip image verification
|
||||||
example: |-
|
examples: |-
|
||||||
### Pull an image from Docker Hub
|
### Pull an image from Docker Hub
|
||||||
|
|
||||||
To download a particular image, or set of images (i.e., a repository), use
|
To download a particular image, or set of images (i.e., a repository), use
|
||||||
|
|
|
@ -25,7 +25,7 @@ options:
|
||||||
- option: disable-content-trust
|
- option: disable-content-trust
|
||||||
default_value: "true"
|
default_value: "true"
|
||||||
description: Skip image signing
|
description: Skip image signing
|
||||||
example: |-
|
examples: |-
|
||||||
### Push a new image to a registry
|
### Push a new image to a registry
|
||||||
|
|
||||||
First save the new image by finding the container ID (using [`docker ps`](ps.md))
|
First save the new image by finding the container ID (using [`docker ps`](ps.md))
|
||||||
|
|
|
@ -4,7 +4,7 @@ long: The `docker rename` command renames a container.
|
||||||
usage: docker rename CONTAINER NEW_NAME
|
usage: docker rename CONTAINER NEW_NAME
|
||||||
pname: docker
|
pname: docker
|
||||||
plink: docker.yaml
|
plink: docker.yaml
|
||||||
example: |-
|
examples: |-
|
||||||
```bash
|
```bash
|
||||||
$ docker rename my_container my_new_container
|
$ docker rename my_container my_new_container
|
||||||
```
|
```
|
||||||
|
|
|
@ -9,7 +9,7 @@ options:
|
||||||
shorthand: t
|
shorthand: t
|
||||||
default_value: "10"
|
default_value: "10"
|
||||||
description: Seconds to wait for stop before killing the container
|
description: Seconds to wait for stop before killing the container
|
||||||
example: |-
|
examples: |-
|
||||||
```bash
|
```bash
|
||||||
$ docker restart my_container
|
$ docker restart my_container
|
||||||
```
|
```
|
||||||
|
|
|
@ -17,7 +17,7 @@ options:
|
||||||
shorthand: v
|
shorthand: v
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Remove the volumes associated with the container
|
description: Remove the volumes associated with the container
|
||||||
example: |-
|
examples: |-
|
||||||
### Remove a container
|
### Remove a container
|
||||||
|
|
||||||
This will remove the container referenced under the link
|
This will remove the container referenced under the link
|
||||||
|
|
|
@ -12,7 +12,7 @@ options:
|
||||||
- option: no-prune
|
- option: no-prune
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Do not delete untagged parents
|
description: Do not delete untagged parents
|
||||||
example: |-
|
examples: |-
|
||||||
You can remove an image using its short or long ID, its tag, or its digest. If
|
You can remove an image using its short or long ID, its tag, or its digest. If
|
||||||
an image has one or more tag referencing it, you must remove all of them before
|
an image has one or more tag referencing it, you must remove all of them before
|
||||||
the image is removed. Digest references are removed automatically when an image
|
the image is removed. Digest references are removed automatically when an image
|
||||||
|
|
|
@ -300,7 +300,7 @@ options:
|
||||||
- option: workdir
|
- option: workdir
|
||||||
shorthand: w
|
shorthand: w
|
||||||
description: Working directory inside the container
|
description: Working directory inside the container
|
||||||
example: |-
|
examples: |-
|
||||||
### Assign name and allocate pseudo-TTY (--name, -it)
|
### Assign name and allocate pseudo-TTY (--name, -it)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -11,7 +11,7 @@ options:
|
||||||
- option: output
|
- option: output
|
||||||
shorthand: o
|
shorthand: o
|
||||||
description: Write to a file, instead of STDOUT
|
description: Write to a file, instead of STDOUT
|
||||||
example: |-
|
examples: |-
|
||||||
### Create a backup that can then be used with `docker load`.
|
### Create a backup that can then be used with `docker load`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -27,7 +27,7 @@ options:
|
||||||
shorthand: s
|
shorthand: s
|
||||||
default_value: "0"
|
default_value: "0"
|
||||||
description: Only displays with at least x stars
|
description: Only displays with at least x stars
|
||||||
example: "### Search images by name\n\nThis example displays images with a name containing
|
examples: "### Search images by name\n\nThis example displays images with a name containing
|
||||||
'busybox':\n\n```none\n$ docker search busybox\n\nNAME DESCRIPTION
|
'busybox':\n\n```none\n$ docker search busybox\n\nNAME DESCRIPTION
|
||||||
\ STARS OFFICIAL AUTOMATED\nbusybox Busybox
|
\ STARS OFFICIAL AUTOMATED\nbusybox Busybox
|
||||||
base image. 316 [OK] \nprogrium/busybox
|
base image. 316 [OK] \nprogrium/busybox
|
||||||
|
|
|
@ -19,7 +19,7 @@ options:
|
||||||
shorthand: i
|
shorthand: i
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Attach container's STDIN
|
description: Attach container's STDIN
|
||||||
example: |-
|
examples: |-
|
||||||
```bash
|
```bash
|
||||||
$ docker start my_container
|
$ docker start my_container
|
||||||
```
|
```
|
||||||
|
|
|
@ -17,7 +17,7 @@ options:
|
||||||
- option: no-stream
|
- option: no-stream
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Disable streaming stats and only pull the first result
|
description: Disable streaming stats and only pull the first result
|
||||||
example: |-
|
examples: |-
|
||||||
Running `docker stats` on all running containers against a Linux daemon.
|
Running `docker stats` on all running containers against a Linux daemon.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -11,7 +11,7 @@ options:
|
||||||
shorthand: t
|
shorthand: t
|
||||||
default_value: "10"
|
default_value: "10"
|
||||||
description: Seconds to wait for stop before killing it
|
description: Seconds to wait for stop before killing it
|
||||||
example: |-
|
examples: |-
|
||||||
```bash
|
```bash
|
||||||
$ docker stop my_container
|
$ docker stop my_container
|
||||||
```
|
```
|
||||||
|
|
|
@ -19,7 +19,7 @@ long: |-
|
||||||
usage: docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]
|
usage: docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]
|
||||||
pname: docker
|
pname: docker
|
||||||
plink: docker.yaml
|
plink: docker.yaml
|
||||||
example: |-
|
examples: |-
|
||||||
### Tag an image referenced by ID
|
### Tag an image referenced by ID
|
||||||
|
|
||||||
To tag a local image with ID "0e5574283393" into the "fedora" repository with
|
To tag a local image with ID "0e5574283393" into the "fedora" repository with
|
||||||
|
|
|
@ -10,7 +10,7 @@ long: |-
|
||||||
usage: docker unpause CONTAINER [CONTAINER...]
|
usage: docker unpause CONTAINER [CONTAINER...]
|
||||||
pname: docker
|
pname: docker
|
||||||
plink: docker.yaml
|
plink: docker.yaml
|
||||||
example: |-
|
examples: |-
|
||||||
```bash
|
```bash
|
||||||
$ docker unpause my_container
|
$ docker unpause my_container
|
||||||
```
|
```
|
||||||
|
|
|
@ -51,7 +51,7 @@ options:
|
||||||
Swap limit equal to memory plus swap: '-1' to enable unlimited swap
|
Swap limit equal to memory plus swap: '-1' to enable unlimited swap
|
||||||
- option: restart
|
- option: restart
|
||||||
description: Restart policy to apply when a container exits
|
description: Restart policy to apply when a container exits
|
||||||
example: |-
|
examples: |-
|
||||||
The following sections illustrate ways to use this command.
|
The following sections illustrate ways to use this command.
|
||||||
|
|
||||||
### Update a container's cpu-shares
|
### Update a container's cpu-shares
|
||||||
|
|
|
@ -13,7 +13,7 @@ options:
|
||||||
- option: format
|
- option: format
|
||||||
shorthand: f
|
shorthand: f
|
||||||
description: Format the output using the given Go template
|
description: Format the output using the given Go template
|
||||||
example: |-
|
examples: |-
|
||||||
### Default output
|
### Default output
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -12,7 +12,7 @@ options:
|
||||||
shorthand: f
|
shorthand: f
|
||||||
default_value: "false"
|
default_value: "false"
|
||||||
description: Force the removal of one or more volumes
|
description: Force the removal of one or more volumes
|
||||||
example: |2
|
examples: |2
|
||||||
|
|
||||||
$ docker volume rm hello
|
$ docker volume rm hello
|
||||||
hello
|
hello
|
||||||
|
|
|
@ -4,7 +4,7 @@ long: Block until one or more containers stop, then print their exit codes
|
||||||
usage: docker wait CONTAINER [CONTAINER...]
|
usage: docker wait CONTAINER [CONTAINER...]
|
||||||
pname: docker
|
pname: docker
|
||||||
plink: docker.yaml
|
plink: docker.yaml
|
||||||
example: |-
|
examples: |-
|
||||||
Start a container in the background.
|
Start a container in the background.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
Loading…
Reference in New Issue