From 97ad2a634d4e1fa51ce0bc70400a9590fe61e12a Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Tue, 2 Oct 2018 11:59:19 +0100 Subject: [PATCH 1/3] get-started/part2: clarify usage of -t/--tag As this is an introductory document, using short options and relying on default behaviors without explanation may cause some confusion. This change it explicit how the --tag option is being used. It also uses an equal sign to visually group the option and its value, so that the . at the end of the command doesn't go unnoticed. --- get-started/part2.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/get-started/part2.md b/get-started/part2.md index 2b1c3c6ebe..534b2b6df4 100644 --- a/get-started/part2.md +++ b/get-started/part2.md @@ -149,7 +149,8 @@ you have. ## Build the app -We are ready to build the app. Make sure you are still at the top level of your new directory. Here's what `ls` should show: +We are ready to build the app. Make sure you are still at the top level of your +new directory. Here's what `ls` should show: ```shell $ ls @@ -157,10 +158,11 @@ Dockerfile app.py requirements.txt ``` Now run the build command. This creates a Docker image, which we're going to -tag using `-t` so it has a friendly name. +name using the `--tag` option, so it has a human-friendly name rather than just +an ID. ```shell -docker build -t friendlyhello . +docker build --tag=friendlyhello . ``` Where is your built image? It's in your machine's local Docker image registry: @@ -172,6 +174,11 @@ REPOSITORY TAG IMAGE ID friendlyhello latest 326387cea398 ``` + +Note how the tag defaulted to `latest`. The full syntax for the tag option would +be something like `--tag=friendlyhello:v0.0.1`. + + > Troubleshooting for Linux users > > _Proxy server settings_ From 48f1f646365a6440086d72193c23068275aebf16 Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Thu, 27 Dec 2018 15:56:04 +0000 Subject: [PATCH 2/3] mention both -t and --tag --- get-started/part2.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/get-started/part2.md b/get-started/part2.md index 534b2b6df4..8af66fbf66 100644 --- a/get-started/part2.md +++ b/get-started/part2.md @@ -158,8 +158,8 @@ Dockerfile app.py requirements.txt ``` Now run the build command. This creates a Docker image, which we're going to -name using the `--tag` option, so it has a human-friendly name rather than just -an ID. +name using the `-t`/`--tag` option, so it has a human-friendly name rather than +just an ID. ```shell docker build --tag=friendlyhello . From 77e1c3d7004faa142ba8cb4d30cdd659f35af6b6 Mon Sep 17 00:00:00 2001 From: Anne Henmi <41210220+ahh-docker@users.noreply.github.com> Date: Tue, 1 Jan 2019 17:58:27 -0700 Subject: [PATCH 3/3] Update part2.md Wording cleanup. --- get-started/part2.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/get-started/part2.md b/get-started/part2.md index 8af66fbf66..5b0886534b 100644 --- a/get-started/part2.md +++ b/get-started/part2.md @@ -158,8 +158,7 @@ Dockerfile app.py requirements.txt ``` Now run the build command. This creates a Docker image, which we're going to -name using the `-t`/`--tag` option, so it has a human-friendly name rather than -just an ID. +name using the `--tag` option. Use `-t` if you want to use the a shorter option. ```shell docker build --tag=friendlyhello .