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