mirror of
https://github.com/docker/docs.git
synced 2026-03-27 22:38:54 +07:00
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.
This commit is contained in:
@@ -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_
|
||||
|
||||
Reference in New Issue
Block a user