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:
Adrian Plata 2019-11-21 10:52:50 -08:00 committed by Sebastiaan van Stijn
parent ae7bb665e7
commit e22f088abb
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 15 additions and 17 deletions

View File

@ -28,7 +28,7 @@ Practices](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-pr
## Usage ## 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 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 specified location `PATH` or `URL`. The `PATH` is a directory on your local
filesystem. The `URL` is a Git repository location. filesystem. The `URL` is a Git repository location.
@ -93,8 +93,7 @@ instructions.
Whenever possible, Docker will re-use the intermediate images (cache), Whenever possible, Docker will re-use the intermediate images (cache),
to accelerate the `docker build` process significantly. This is indicated by to accelerate the `docker build` process significantly. This is indicated by
the `Using cache` message in the console output. 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 (For more information, see the [`Dockerfile` best practices guide](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/):
`Dockerfile` best practices guide):
$ docker build -t svendowideit/ambassador . $ docker build -t svendowideit/ambassador .
Sending build context to Docker daemon 15.36 kB Sending build context to Docker daemon 15.36 kB
@ -571,7 +570,7 @@ Or
FROM [--platform=<platform>] <image>[@<digest>] [AS <name>] FROM [--platform=<platform>] <image>[@<digest>] [AS <name>]
The `FROM` instruction initializes a new build stage and sets the 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 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 any valid image it is especially easy to start by **pulling an image** from
the [*Public Repositories*](https://docs.docker.com/engine/tutorials/dockerrepos/). 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`. flag, for example `docker build --no-cache`.
See the [`Dockerfile` Best Practices 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 The cache for `RUN` instructions can be invalidated by `ADD` instructions. See
[below](#add) for details. [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 > following instructions from the Dockerfile if the contents of `<src>` have
> changed. This includes invalidating the cache for `RUN` instructions. > changed. This includes invalidating the cache for `RUN` instructions.
> See the [`Dockerfile` Best Practices > 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: `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 string with multiple arguments, such as `VOLUME /var/log` or `VOLUME /var/log
/var/db`. For more information/examples and mounting instructions via the /var/db`. For more information/examples and mounting instructions via the
Docker client, refer to 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. documentation.
The `docker run` command initializes the newly created volume with any data 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 ## Dockerfile examples
Below you can see some examples of Dockerfile syntax. If you're interested in Below you can see some examples of Dockerfile syntax.
something more realistic, take a look at the list of [Dockerization examples](https://docs.docker.com/engine/examples/).
``` ```
# Nginx # Nginx