Merge component 'cli' from git@github.com:docker/cli master
This commit is contained in:
@ -28,7 +28,7 @@ func newConfigCreateCommand(dockerCli command.Cli) *cobra.Command {
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "create [OPTIONS] CONFIG file|-",
|
||||
Short: "Create a configuration file from a file or STDIN as content",
|
||||
Short: "Create a config from a file or STDIN",
|
||||
Args: cli.ExactArgs(2),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
createOpts.name = args[0]
|
||||
|
||||
@ -21,7 +21,7 @@ func newConfigInspectCommand(dockerCli command.Cli) *cobra.Command {
|
||||
opts := inspectOptions{}
|
||||
cmd := &cobra.Command{
|
||||
Use: "inspect [OPTIONS] CONFIG [CONFIG...]",
|
||||
Short: "Display detailed information on one or more configuration files",
|
||||
Short: "Display detailed information on one or more configs",
|
||||
Args: cli.RequiresMinArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
opts.names = args
|
||||
|
||||
@ -19,7 +19,7 @@ func newConfigRemoveCommand(dockerCli command.Cli) *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "rm CONFIG [CONFIG...]",
|
||||
Aliases: []string{"remove"},
|
||||
Short: "Remove one or more configuration files",
|
||||
Short: "Remove one or more configs",
|
||||
Args: cli.RequiresMinArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
opts := removeOptions{
|
||||
|
||||
@ -767,6 +767,30 @@ publish the port when running the container, use the `-p` flag on `docker run`
|
||||
to publish and map one or more ports, or the `-P` flag to publish all exposed
|
||||
ports and map them to high-order ports.
|
||||
|
||||
By default, `EXPOSE` assumes TCP. You can also specify UDP:
|
||||
|
||||
```Dockerfile
|
||||
EXPOSE 80/udp
|
||||
```
|
||||
|
||||
To expose on both TCP and UDP, include two lines:
|
||||
|
||||
```Dockerfile
|
||||
EXPOSE 80/tcp
|
||||
EXPOSE 80/udp
|
||||
```
|
||||
|
||||
In this case, if you use `-P` with `docker run`, the port will be exposed once
|
||||
for TCP and once for UDP. Remember that `-P` uses an ephemeral high-ordered host
|
||||
port on the host, so the port will not be the same for TCP and UDP.
|
||||
|
||||
Regardless of the `EXPOSE` settings, you can override them at runtime by using
|
||||
the `-p` flag. For example
|
||||
|
||||
```bash
|
||||
docker run -p 80:80/tcp -p 80:80/udp ...
|
||||
```
|
||||
|
||||
To set up port redirection on the host system, see [using the -P
|
||||
flag](run.md#expose-incoming-ports). The `docker network` command supports
|
||||
creating networks for communication among containers without the need to
|
||||
|
||||
@ -18,7 +18,8 @@ keywords: "stdin, tarred, repository"
|
||||
```markdown
|
||||
Usage: docker load [OPTIONS]
|
||||
|
||||
Load an image from a tar archive or STDIN
|
||||
Load an image or repository from a tar archive (even if compressed with gzip,
|
||||
bzip2, or xz) from a file or STDIN.
|
||||
|
||||
Options:
|
||||
--help Print usage
|
||||
@ -28,13 +29,13 @@ Options:
|
||||
```
|
||||
## Description
|
||||
|
||||
`docker load` loads a tarred repository from a file or the standard input stream.
|
||||
It restores both images and tags.
|
||||
Load an image or repository from a tar archive (even if compressed with gzip,
|
||||
bzip2, or xz) from a file or STDIN. It restores both images and tags.
|
||||
|
||||
## Examples
|
||||
|
||||
```bash
|
||||
$ docker images
|
||||
$ docker docker image ls
|
||||
|
||||
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user