зеркало из https://github.com/microsoft/docker.git
updated documentation for mentioning images vs containers
Docker-DCO-1.1-Signed-off-by: Robin Speekenbrink <robin@kingsquare.nl> (github: fruitl00p) rebased by Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
This commit is contained in:
Родитель
b204b97c9a
Коммит
a0505edc9a
|
@ -47,7 +47,7 @@ func (cli *DockerCli) CmdHelp(args ...string) error {
|
|||
help := fmt.Sprintf("Usage: docker [OPTIONS] COMMAND [arg...]\n -H=[unix://%s]: tcp://host:port to bind/connect to or unix://path/to/socket to use\n\nA self-sufficient runtime for linux containers.\n\nCommands:\n", api.DEFAULTUNIXSOCKET)
|
||||
for _, command := range [][]string{
|
||||
{"attach", "Attach to a running container"},
|
||||
{"build", "Build a container from a Dockerfile"},
|
||||
{"build", "Build an image from a Dockerfile"},
|
||||
{"commit", "Create a new image from a container's changes"},
|
||||
{"cp", "Copy files/folders from the containers filesystem to the host path"},
|
||||
{"diff", "Inspect changes on a container's filesystem"},
|
||||
|
@ -105,7 +105,7 @@ func (cli *DockerCli) CmdInsert(args ...string) error {
|
|||
}
|
||||
|
||||
func (cli *DockerCli) CmdBuild(args ...string) error {
|
||||
cmd := cli.Subcmd("build", "[OPTIONS] PATH | URL | -", "Build a new container image from the source code at PATH")
|
||||
cmd := cli.Subcmd("build", "[OPTIONS] PATH | URL | -", "Build a new image from the source code at PATH")
|
||||
tag := cmd.String([]string{"t", "-tag"}, "", "Repository name (and optionally a tag) to be applied to the resulting image in case of success")
|
||||
suppressOutput := cmd.Bool([]string{"q", "-quiet"}, false, "Suppress the verbose output generated by the containers")
|
||||
noCache := cmd.Bool([]string{"#no-cache", "-no-cache"}, false, "Do not use cache when building the image")
|
||||
|
|
|
@ -71,7 +71,7 @@ complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -l sig-proxy -d
|
|||
complete -c docker -A -f -n '__fish_seen_subcommand_from attach' -a '(__fish_print_docker_containers running)' -d "Container"
|
||||
|
||||
# build
|
||||
complete -c docker -f -n '__fish_docker_no_subcommand' -a build -d 'Build a container from a Dockerfile'
|
||||
complete -c docker -f -n '__fish_docker_no_subcommand' -a build -d 'Build an image from a Dockerfile'
|
||||
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l no-cache -d 'Do not use cache when building the image'
|
||||
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -s q -l quiet -d 'Suppress the verbose output generated by the containers'
|
||||
complete -c docker -A -f -n '__fish_seen_subcommand_from build' -l rm -d 'Remove intermediate containers after a successful build'
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
% William Henry
|
||||
% APRIL 2014
|
||||
# NAME
|
||||
docker-build - Build a container image from a Dockerfile source at PATH
|
||||
docker-build - Build an image from a Dockerfile source at PATH
|
||||
|
||||
# SYNOPSIS
|
||||
**docker build** [**--no-cache**[=*false*]] [**-q**|**--quiet**[=*false*]]
|
||||
|
|
|
@ -81,7 +81,7 @@ port=[4243] or path =[/var/run/docker.sock] is omitted, default values are used.
|
|||
Attach to a running container
|
||||
|
||||
**docker-build(1)**
|
||||
Build a container from a Dockerfile
|
||||
Build an image from a Dockerfile
|
||||
|
||||
**docker-commit(1)**
|
||||
Create a new image from a container's changes
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
.\"
|
||||
.TH "DOCKER" "1" "MARCH 2014" "0.1" "Docker"
|
||||
.SH NAME
|
||||
docker-build \- Build a container image from a Dockerfile source at PATH
|
||||
docker-build \- Build an image from a Dockerfile source at PATH
|
||||
.SH SYNOPSIS
|
||||
.B docker build
|
||||
[\fB--no-cache\fR[=\fIfalse\fR]
|
||||
|
|
|
@ -69,7 +69,7 @@ Print version information and quit
|
|||
Attach to a running container
|
||||
.TP
|
||||
.B build
|
||||
Build a container from a Dockerfile
|
||||
Build an image from a Dockerfile
|
||||
.TP
|
||||
.B commit
|
||||
Create a new image from a container's changes
|
||||
|
|
|
@ -58,7 +58,7 @@ There are three steps:
|
|||
containerized CFEngine installation.
|
||||
3. Start your application processes as part of the `docker run` command.
|
||||
|
||||
### Building the container image
|
||||
### Building the image
|
||||
|
||||
The first two steps can be done as part of a Dockerfile, as follows.
|
||||
|
||||
|
@ -87,7 +87,7 @@ The first two steps can be done as part of a Dockerfile, as follows.
|
|||
ENTRYPOINT ["/var/cfengine/bin/docker_processes_run.sh"]
|
||||
|
||||
By saving this file as Dockerfile to a working directory, you can then build
|
||||
your container with the docker build command, e.g.
|
||||
your image with the docker build command, e.g.
|
||||
`docker build -t managed_image`.
|
||||
|
||||
### Testing the container
|
||||
|
|
|
@ -95,9 +95,9 @@ Here We've exposed ports 22 and 80 on the container and we're running
|
|||
the `/usr/bin/supervisord` binary when the container
|
||||
launches.
|
||||
|
||||
## Building our container
|
||||
## Building our image
|
||||
|
||||
We can now build our new container.
|
||||
We can now build our new image.
|
||||
|
||||
$ sudo docker build -t <yourname>/supervisord .
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ You will see a list of all currently available commands.
|
|||
|
||||
Commands:
|
||||
attach Attach to a running container
|
||||
build Build a container from a Dockerfile
|
||||
build Build an image from a Dockerfile
|
||||
commit Create a new image from a container's changes
|
||||
. . .
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ This directory holds the authoritative specifications of APIs defined and implem
|
|||
|
||||
* The remote API by which a docker node can be queried over HTTP
|
||||
* The registry API by which a docker node can download and upload
|
||||
container images for storage and sharing
|
||||
images for storage and sharing
|
||||
* The index search API by which a docker node can search the public
|
||||
index for images to download
|
||||
* The docker.io OAuth and accounts API which 3rd party services can
|
||||
|
|
|
@ -190,7 +190,7 @@ To kill the container, use `docker kill`.
|
|||
|
||||
Usage: docker build [OPTIONS] PATH | URL | -
|
||||
|
||||
Build a new container image from the source code at PATH
|
||||
Build a new image from the source code at PATH
|
||||
|
||||
--force-rm=false Always remove intermediate containers, even after unsuccessful builds
|
||||
--no-cache=false Do not use cache when building the image
|
||||
|
|
|
@ -157,7 +157,7 @@ TCP and a Unix socket
|
|||
|
||||
## Committing (saving) a container state
|
||||
|
||||
Save your containers state to a container image, so the state can be
|
||||
Save your containers state to an image, so the state can be
|
||||
re-used.
|
||||
|
||||
When you commit your container only the differences between the image
|
||||
|
@ -171,7 +171,7 @@ will be stored (as a diff). See which images you already have using the
|
|||
# List your containers
|
||||
$ sudo docker images
|
||||
|
||||
You now have a image state from which you can create new instances.
|
||||
You now have an image state from which you can create new instances.
|
||||
|
||||
Read more about [*Share Images via Repositories*](
|
||||
../workingwithrepository/#working-with-the-repository) or
|
||||
|
|
|
@ -70,7 +70,7 @@ EXAMPLES:
|
|||
|
||||
#### Builder
|
||||
|
||||
+ 'docker build -t FOO .' applies the tag FOO to the newly built container
|
||||
+ 'docker build -t FOO .' applies the tag FOO to the newly built image
|
||||
|
||||
#### Remote API
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ set -e
|
|||
# - The right way to call this script is to invoke "make" from
|
||||
# your checkout of the Docker repository.
|
||||
# the Makefile will do a "docker build -t docker ." and then
|
||||
# "docker run hack/make.sh" in the resulting container image.
|
||||
# "docker run hack/make.sh" in the resulting image.
|
||||
#
|
||||
|
||||
set -o pipefail
|
||||
|
|
Загрузка…
Ссылка в новой задаче