Merge pull request #7455 from waldyrious/patch-2

get-started/part2: clarify usage of -t/--tag
This commit is contained in:
Anne Henmi 2019-01-02 08:48:28 -07:00 committed by GitHub
commit be71a9a8b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 3 deletions

View File

@ -147,17 +147,19 @@ 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
Dockerfile app.py requirements.txt
```
Now run the build command with the optional `-t` flag to [tag your image with a friendly name](/engine/reference/commandline/build/#tag-an-image--t), and `.` to [set your build context](/engine/reference/commandline/build/#build-with-path).
Now run the build command. This creates a Docker image, which we're going to
name using the `--tag` option. Use `-t` if you want to use the a shorter option.
```shell
docker build -t friendlyhello .
docker build --tag=friendlyhello .
```
Where is your built image? It's in your machine's local Docker image registry:
@ -169,6 +171,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_