mirror of https://github.com/docker/docs.git
Merge pull request #7455 from waldyrious/patch-2
get-started/part2: clarify usage of -t/--tag
This commit is contained in:
commit
be71a9a8b7
|
@ -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_
|
||||
|
|
Loading…
Reference in New Issue