mirror of https://github.com/docker/docs.git
Fixed some typos and other issues from ostezer comments.
Docker-DCO-1.1-Signed-off-by: William Henry <whenry@redhat.com> (github: ipbabble) Changes to be committed: modified: contrib/man/md/docker-build.1.md modified: contrib/man/md/docker-run.1.md modified: contrib/man/md/docker-tag.1.md
This commit is contained in:
parent
a14a88e53d
commit
e471a87f19
|
|
@ -70,29 +70,31 @@ specified within the `ADD` instruction into the specified target.
|
||||||
## Building an image and naming that image
|
## Building an image and naming that image
|
||||||
|
|
||||||
A good practice is to give a name to the image you are building. There are
|
A good practice is to give a name to the image you are building. There are
|
||||||
not hard rules here but it is best to give the names consideration.
|
no hard rules here but it is best to give the names consideration.
|
||||||
|
|
||||||
The **-t**/**--tag** flag is used to rename an image. Here are some examples:
|
The **-t**/**--tag** flag is used to rename an image. Here are some examples:
|
||||||
|
|
||||||
Though t is not good practice, image names can be aribtrary:
|
Though it is not a good practice, image names can be arbtrary:
|
||||||
|
|
||||||
docker build -t myimage .
|
docker build -t myimage .
|
||||||
|
|
||||||
A better approach is provide a fully qualified and meaningful repository
|
A better approach is to provide a fully qualified and meaningful repository,
|
||||||
name, name, and tag (where tag in this context means the qualifier after
|
name, and tag (where the tag in this context means the qualifier after
|
||||||
the ":"). In this example we build a Jboss image for the Fedora repository
|
the ":"). In this example we build a JBoss image for the Fedora repository
|
||||||
and give it a version 1.0:
|
and give it the version 1.0:
|
||||||
|
|
||||||
docker build -t fedora/jboss:1.0
|
docker build -t fedora/jboss:1.0
|
||||||
|
|
||||||
The next example is for the "whenry" user repository and uses Fedora and
|
The next example is for the "whenry" user repository and uses Fedora and
|
||||||
JBoss and gives it a version 2.1 :
|
JBoss and gives it the version 2.1 :
|
||||||
|
|
||||||
docker build -t whenry/fedora-jboss:V2.1
|
docker build -t whenry/fedora-jboss:V2.1
|
||||||
|
|
||||||
Or:
|
If you do not provide a version tag then Docker will assign `latest`:
|
||||||
|
|
||||||
docker build -t whenry/fedora-jboss:latest
|
docker build -t whenry/fedora-jboss
|
||||||
|
|
||||||
|
When you list the images, the image above will have the tag `latest`.
|
||||||
|
|
||||||
So renaming an image is arbitrary but consideration should be given to
|
So renaming an image is arbitrary but consideration should be given to
|
||||||
a useful convention that makes sense for consumers and should also take
|
a useful convention that makes sense for consumers and should also take
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,8 @@ the other shell to view a list of the running containers. You can reattach to a
|
||||||
detached container with **docker attach**. If you choose to run a container in
|
detached container with **docker attach**. If you choose to run a container in
|
||||||
the detached mode, then you cannot use the **-rm** option.
|
the detached mode, then you cannot use the **-rm** option.
|
||||||
|
|
||||||
When attached in tty mode, you can detach from a running container by pressing
|
When attached in the tty mode, you can detach from a running container without
|
||||||
the keys ctrl+p ctrl+q.
|
stopping the process by pressing the keys CTRL-P CTRL-Q.
|
||||||
|
|
||||||
|
|
||||||
**--dns**=*IP-address*
|
**--dns**=*IP-address*
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ docker-tag - Tag an image in the repository
|
||||||
IMAGE [REGISTRYHOST/][USERNAME/]NAME[:TAG]
|
IMAGE [REGISTRYHOST/][USERNAME/]NAME[:TAG]
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
This will rename an image in the repository. "Tag" is this context means the
|
This will rename an image in the repository. This refers to the
|
||||||
entire image name including the optional TAG after the ':'.
|
entire image name including the optional TAG after the ':'.
|
||||||
|
|
||||||
# "OPTIONS"
|
# "OPTIONS"
|
||||||
|
|
@ -27,15 +27,16 @@ separated by a ':'
|
||||||
The image name.
|
The image name.
|
||||||
|
|
||||||
**TAG**
|
**TAG**
|
||||||
The tag you are assigning to the image. This is often a version or other
|
The tag you are assigning to the image. Though this is arbitrary it is
|
||||||
'tag' to distinguish from other similarly named images.
|
recommended to be used for a version to disinguish images with the same name.
|
||||||
|
Note that here TAG is a part of the overall name or "tag".
|
||||||
|
|
||||||
# EXAMPLES
|
# EXAMPLES
|
||||||
|
|
||||||
## Tagging an image
|
## Tagging an image
|
||||||
|
|
||||||
Here is an example of renaming an image with the repository 'fedora', name
|
Here is an example of renaming an image (e.g. 0e5574283393) as "httpd" and
|
||||||
'httpd', and tag version1.0 :
|
tagging it into the "fedora" repository with "version1.0":
|
||||||
|
|
||||||
docker tag 0e5574283393 fedora/httpd:version1.0
|
docker tag 0e5574283393 fedora/httpd:version1.0
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue