This PR adds recommendations in man pages to use only [a-z0-9-_.] when
naming and tagging images. The purpose of this is to add consistency
and to make image naming caps rules seem less arbitrary.
This PR addresses confusion with:
1. BaseImage:Tagged (not allowed)
2. baseimage:Tagged (allowed)
3. baseimage/tagged:V1 (allowed)
4. baseimage/Tagged:V1 (not allowed)
Signed-off-by: Sally O'Malley <somalley@redhat.com>
| ... | ... |
@@ -171,8 +171,8 @@ instruction into the specified target. |
| 171 | 171 |
|
| 172 | 172 |
## Building an image and naming that image |
| 173 | 173 |
|
| 174 |
-A good practice is to give a name to the image you are building. There are |
|
| 175 |
-no hard rules here but it is best to give the names consideration. |
|
| 174 |
+A good practice is to give a name to the image you are building. Note that |
|
| 175 |
+only a-z0-9-_. should be used for consistency. There are no hard rules here but it is best to give the names consideration. |
|
| 176 | 176 |
|
| 177 | 177 |
The **-t**/**--tag** flag is used to rename an image. Here are some examples: |
| 178 | 178 |
|
| ... | ... |
@@ -190,7 +190,7 @@ and give it the version 1.0: |
| 190 | 190 |
The next example is for the "whenry" user repository and uses Fedora and |
| 191 | 191 |
JBoss and gives it the version 2.1 : |
| 192 | 192 |
|
| 193 |
- docker build -t whenry/fedora-jboss:V2.1 |
|
| 193 |
+ docker build -t whenry/fedora-jboss:v2.1 |
|
| 194 | 194 |
|
| 195 | 195 |
If you do not provide a version tag then Docker will assign `latest`: |
| 196 | 196 |
|
| ... | ... |
@@ -229,3 +229,4 @@ Note: supported compression formats are 'xz', 'bzip2', 'gzip' and 'identity' (no |
| 229 | 229 |
March 2014, Originally compiled by William Henry (whenry at redhat dot com) |
| 230 | 230 |
based on docker.com source material and internal work. |
| 231 | 231 |
June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au> |
| 232 |
+June 2015, updated by Sally O'Malley <somalley@redhat.com> |
| ... | ... |
@@ -50,6 +50,9 @@ create a new image run `docker ps` to find the container's ID and then run: |
| 50 | 50 |
# docker commit -m="Added Apache to Fedora base image" \ |
| 51 | 51 |
-a="A D Ministrator" 98bd7fc99854 fedora/fedora_httpd:20 |
| 52 | 52 |
|
| 53 |
+Note that only a-z0-9-_. are allowed when naming images from an |
|
| 54 |
+existing container. |
|
| 55 |
+ |
|
| 53 | 56 |
## Apply specified Dockerfile instructions while committing the image |
| 54 | 57 |
If an existing container was created without the DEBUG environment |
| 55 | 58 |
variable set to "true", you can create a new image based on that |
| ... | ... |
@@ -64,3 +67,4 @@ based on docker.com source material and in |
| 64 | 64 |
June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au> |
| 65 | 65 |
July 2014, updated by Sven Dowideit <SvenDowideit@home.org.au> |
| 66 | 66 |
Oct 2014, updated by Daniel, Dao Quang Minh <daniel at nitrous dot io> |
| 67 |
+June 2015, updated by Sally O'Malley <somalley@redhat.com> |
| ... | ... |
@@ -24,7 +24,8 @@ specify a `REGISTRY_HOST`, the command uses Docker's public registry located at |
| 24 | 24 |
# Pushing a new image to a registry |
| 25 | 25 |
|
| 26 | 26 |
First save the new image by finding the container ID (using **docker ps**) |
| 27 |
-and then committing it to a new image name: |
|
| 27 |
+and then committing it to a new image name. Note that only a-z0-9-_. are |
|
| 28 |
+allowed when naming images: |
|
| 28 | 29 |
|
| 29 | 30 |
# docker commit c16378f943fe rhel-httpd |
| 30 | 31 |
|
| ... | ... |
@@ -48,4 +49,4 @@ April 2014, Originally compiled by William Henry (whenry at redhat dot com) |
| 48 | 48 |
based on docker.com source material and internal work. |
| 49 | 49 |
June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au> |
| 50 | 50 |
April 2015, updated by Mary Anthony for v2 <mary@docker.com> |
| 51 |
- |
|
| 51 |
+June 2015, updated by Sally O'Malley <somalley@redhat.com> |
| ... | ... |
@@ -34,6 +34,7 @@ separated by a ':' |
| 34 | 34 |
**TAG** |
| 35 | 35 |
The tag you are assigning to the image. Though this is arbitrary it is |
| 36 | 36 |
recommended to be used for a version to distinguish images with the same name. |
| 37 |
+Also, for consistency tags should only include a-z0-9-_. . |
|
| 37 | 38 |
Note that here TAG is a part of the overall name or "tag". |
| 38 | 39 |
|
| 39 | 40 |
# OPTIONS |
| ... | ... |
@@ -62,4 +63,4 @@ based on docker.com source material and internal work. |
| 62 | 62 |
June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au> |
| 63 | 63 |
July 2014, updated by Sven Dowideit <SvenDowideit@home.org.au> |
| 64 | 64 |
April 2015, updated by Mary Anthony for v2 <mary@docker.com> |
| 65 |
- |
|
| 65 |
+June 2015, updated by Sally O'Malley <somalley@redhat.com> |