mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge branch 'master' into builder_server-2
This commit is contained in:
commit
4205b6bb1d
4 changed files with 48 additions and 58 deletions
62
commands.go
62
commands.go
|
@ -74,37 +74,37 @@ func (cli *DockerCli) CmdHelp(args ...string) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
help := fmt.Sprintf("Usage: docker [OPTIONS] COMMAND [arg...]\n -H=\"%s:%d\": Host:port to bind/connect to\n\nA self-sufficient runtime for linux containers.\n\nCommands:\n", cli.host, cli.port)
|
help := fmt.Sprintf("Usage: docker [OPTIONS] COMMAND [arg...]\n -H=\"%s:%d\": Host:port to bind/connect to\n\nA self-sufficient runtime for linux containers.\n\nCommands:\n", cli.host, cli.port)
|
||||||
for cmd, description := range map[string]string{
|
for _, command := range [][2]string{
|
||||||
"attach": "Attach to a running container",
|
{"attach", "Attach to a running container"},
|
||||||
"build": "Build a container from a Dockerfile",
|
{"build", "Build a container from a Dockerfile"},
|
||||||
"commit": "Create a new image from a container's changes",
|
{"commit", "Create a new image from a container's changes"},
|
||||||
"diff": "Inspect changes on a container's filesystem",
|
{"diff", "Inspect changes on a container's filesystem"},
|
||||||
"export": "Stream the contents of a container as a tar archive",
|
{"export", "Stream the contents of a container as a tar archive"},
|
||||||
"history": "Show the history of an image",
|
{"history", "Show the history of an image"},
|
||||||
"images": "List images",
|
{"images", "List images"},
|
||||||
"import": "Create a new filesystem image from the contents of a tarball",
|
{"import", "Create a new filesystem image from the contents of a tarball"},
|
||||||
"info": "Display system-wide information",
|
{"info", "Display system-wide information"},
|
||||||
"insert": "Insert a file in an image",
|
{"insert", "Insert a file in an image"},
|
||||||
"inspect": "Return low-level information on a container",
|
{"inspect", "Return low-level information on a container"},
|
||||||
"kill": "Kill a running container",
|
{"kill", "Kill a running container"},
|
||||||
"login": "Register or Login to the docker registry server",
|
{"login", "Register or Login to the docker registry server"},
|
||||||
"logs": "Fetch the logs of a container",
|
{"logs", "Fetch the logs of a container"},
|
||||||
"port": "Lookup the public-facing port which is NAT-ed to PRIVATE_PORT",
|
{"port", "Lookup the public-facing port which is NAT-ed to PRIVATE_PORT"},
|
||||||
"ps": "List containers",
|
{"ps", "List containers"},
|
||||||
"pull": "Pull an image or a repository from the docker registry server",
|
{"pull", "Pull an image or a repository from the docker registry server"},
|
||||||
"push": "Push an image or a repository to the docker registry server",
|
{"push", "Push an image or a repository to the docker registry server"},
|
||||||
"restart": "Restart a running container",
|
{"restart", "Restart a running container"},
|
||||||
"rm": "Remove a container",
|
{"rm", "Remove a container"},
|
||||||
"rmi": "Remove an image",
|
{"rmi", "Remove an image"},
|
||||||
"run": "Run a command in a new container",
|
{"run", "Run a command in a new container"},
|
||||||
"search": "Search for an image in the docker index",
|
{"search", "Search for an image in the docker index"},
|
||||||
"start": "Start a stopped container",
|
{"start", "Start a stopped container"},
|
||||||
"stop": "Stop a running container",
|
{"stop", "Stop a running container"},
|
||||||
"tag": "Tag an image into a repository",
|
{"tag", "Tag an image into a repository"},
|
||||||
"version": "Show the docker version information",
|
{"version", "Show the docker version information"},
|
||||||
"wait": "Block until a container stops, then print its exit code",
|
{"wait", "Block until a container stops}, then print its exit code"},
|
||||||
} {
|
} {
|
||||||
help += fmt.Sprintf(" %-10.10s%s\n", cmd, description)
|
help += fmt.Sprintf(" %-10.10s%s\n", command[0], command[1])
|
||||||
}
|
}
|
||||||
fmt.Println(help)
|
fmt.Println(help)
|
||||||
return nil
|
return nil
|
||||||
|
@ -371,12 +371,10 @@ func (cli *DockerCli) CmdWait(args ...string) error {
|
||||||
// 'docker version': show version information
|
// 'docker version': show version information
|
||||||
func (cli *DockerCli) CmdVersion(args ...string) error {
|
func (cli *DockerCli) CmdVersion(args ...string) error {
|
||||||
cmd := Subcmd("version", "", "Show the docker version information.")
|
cmd := Subcmd("version", "", "Show the docker version information.")
|
||||||
fmt.Println(len(args))
|
|
||||||
if err := cmd.Parse(args); err != nil {
|
if err := cmd.Parse(args); err != nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println(cmd.NArg())
|
|
||||||
if cmd.NArg() > 0 {
|
if cmd.NArg() > 0 {
|
||||||
cmd.Usage()
|
cmd.Usage()
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
:title: Building Blocks
|
|
||||||
:description: An introduction to docker and standard containers?
|
|
||||||
:keywords: containers, lxc, concepts, explanation
|
|
||||||
|
|
||||||
|
|
||||||
Building blocks
|
|
||||||
===============
|
|
||||||
|
|
||||||
.. _images:
|
|
||||||
|
|
||||||
Images
|
|
||||||
------
|
|
||||||
An original container image. These are stored on disk and are comparable with what you normally expect from a stopped virtual machine image. Images are stored (and retrieved from) repository
|
|
||||||
|
|
||||||
Images are stored on your local file system under /var/lib/docker/graph
|
|
||||||
|
|
||||||
|
|
||||||
.. _containers:
|
|
||||||
|
|
||||||
Containers
|
|
||||||
----------
|
|
||||||
A container is a local version of an image. It can be running or stopped, The equivalent would be a virtual machine instance.
|
|
||||||
|
|
||||||
Containers are stored on your local file system under /var/lib/docker/containers
|
|
||||||
|
|
|
@ -13,5 +13,4 @@ Contents:
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
../index
|
../index
|
||||||
buildingblocks
|
|
||||||
|
|
||||||
|
|
|
@ -67,3 +67,21 @@ To start on system boot:
|
||||||
::
|
::
|
||||||
|
|
||||||
sudo systemctl enable docker
|
sudo systemctl enable docker
|
||||||
|
|
||||||
|
Network Configuration
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
IPv4 packet forwarding is disabled by default on Arch, so internet access from inside
|
||||||
|
the container may not work.
|
||||||
|
|
||||||
|
To enable the forwarding, run as root on the host system:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
sysctl net.ipv4.ip_forward=1
|
||||||
|
|
||||||
|
And, to make it persistent across reboots, enable it on the host's **/etc/sysctl.conf**:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
net.ipv4.ip_forward=1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue