mirror of https://github.com/docker/cli.git
Fixing some links and deleting an older page reference
Signed-off-by: Adrian Plata <adrian.plata@docker.com>
(cherry picked from commit 8195512206
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
ae7bb665e7
commit
e22f088abb
|
@ -28,7 +28,7 @@ Practices](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-pr
|
|||
|
||||
## Usage
|
||||
|
||||
The [`docker build`](commandline/build.md) command builds an image from
|
||||
The [docker build](commandline/build.md) command builds an image from
|
||||
a `Dockerfile` and a *context*. The build's context is the set of files at a
|
||||
specified location `PATH` or `URL`. The `PATH` is a directory on your local
|
||||
filesystem. The `URL` is a Git repository location.
|
||||
|
@ -93,8 +93,7 @@ instructions.
|
|||
Whenever possible, Docker will re-use the intermediate images (cache),
|
||||
to accelerate the `docker build` process significantly. This is indicated by
|
||||
the `Using cache` message in the console output.
|
||||
(For more information, see the [Build cache section](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#build-cache) in the
|
||||
`Dockerfile` best practices guide):
|
||||
(For more information, see the [`Dockerfile` best practices guide](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/):
|
||||
|
||||
$ docker build -t svendowideit/ambassador .
|
||||
Sending build context to Docker daemon 15.36 kB
|
||||
|
@ -571,7 +570,7 @@ Or
|
|||
FROM [--platform=<platform>] <image>[@<digest>] [AS <name>]
|
||||
|
||||
The `FROM` instruction initializes a new build stage and sets the
|
||||
[*Base Image*](glossary.md#base-image) for subsequent instructions. As such, a
|
||||
[*Base Image*](../../glossary/#base-image) for subsequent instructions. As such, a
|
||||
valid `Dockerfile` must start with a `FROM` instruction. The image can be
|
||||
any valid image – it is especially easy to start by **pulling an image** from
|
||||
the [*Public Repositories*](https://docs.docker.com/engine/tutorials/dockerrepos/).
|
||||
|
@ -694,7 +693,7 @@ cache for `RUN` instructions can be invalidated by using the `--no-cache`
|
|||
flag, for example `docker build --no-cache`.
|
||||
|
||||
See the [`Dockerfile` Best Practices
|
||||
guide](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#/build-cache) for more information.
|
||||
guide](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/) for more information.
|
||||
|
||||
The cache for `RUN` instructions can be invalidated by `ADD` instructions. See
|
||||
[below](#add) for details.
|
||||
|
@ -1015,7 +1014,7 @@ of whether or not the file has changed and the cache should be updated.
|
|||
> following instructions from the Dockerfile if the contents of `<src>` have
|
||||
> changed. This includes invalidating the cache for `RUN` instructions.
|
||||
> See the [`Dockerfile` Best Practices
|
||||
guide](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#/build-cache) for more information.
|
||||
guide](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/) for more information.
|
||||
|
||||
|
||||
`ADD` obeys the following rules:
|
||||
|
@ -1436,7 +1435,7 @@ containers. The value can be a JSON array, `VOLUME ["/var/log/"]`, or a plain
|
|||
string with multiple arguments, such as `VOLUME /var/log` or `VOLUME /var/log
|
||||
/var/db`. For more information/examples and mounting instructions via the
|
||||
Docker client, refer to
|
||||
[*Share Directories via Volumes*](https://docs.docker.com/engine/tutorials/dockervolumes/#/mount-a-host-directory-as-a-data-volume)
|
||||
[*Share Directories via Volumes*](https://docs.docker.com/engine/tutorials/dockervolumes/)
|
||||
documentation.
|
||||
|
||||
The `docker run` command initializes the newly created volume with any data
|
||||
|
@ -2060,8 +2059,7 @@ builder with a syntax directive. To learn about these features, [refer to the do
|
|||
|
||||
## Dockerfile examples
|
||||
|
||||
Below you can see some examples of Dockerfile syntax. If you're interested in
|
||||
something more realistic, take a look at the list of [Dockerization examples](https://docs.docker.com/engine/examples/).
|
||||
Below you can see some examples of Dockerfile syntax.
|
||||
|
||||
```
|
||||
# Nginx
|
||||
|
|
Loading…
Reference in New Issue