diff --git a/docs/reference/commandline/build.md b/docs/reference/commandline/build.md
index 486d38e2d6..a2a6e9d2df 100644
--- a/docs/reference/commandline/build.md
+++ b/docs/reference/commandline/build.md
@@ -326,7 +326,7 @@ project contains multiple Dockerfiles that expect to ignore different sets of
files.
-### Tag an image (-t)
+### Tag an image (-t, --tag)
```console
$ docker build -t vieux/apache:2.0 .
@@ -346,7 +346,7 @@ For example, to tag an image both as `whenry/fedora-jboss:latest` and
$ docker build -t whenry/fedora-jboss:latest -t whenry/fedora-jboss:v2.1 .
```
-### Specify a Dockerfile (-f)
+### Specify a Dockerfile (-f, --file)
```console
$ docker build -f Dockerfile.debug .
@@ -393,17 +393,17 @@ the command line.
> repeatable builds on remote Docker hosts. This is also the reason why
> `ADD ../file` does not work.
-### Use a custom parent cgroup (--cgroup-parent)
+### Use a custom parent cgroup (--cgroup-parent)
When `docker build` is run with the `--cgroup-parent` option the containers
used in the build will be run with the [corresponding `docker run` flag](../run.md#specify-custom-cgroups).
-### Set ulimits in container (--ulimit)
+### Set ulimits in container (--ulimit)
Using the `--ulimit` option with `docker build` will cause each build step's
container to be started using those [`--ulimit` flag values](run.md#set-ulimits-in-container---ulimit).
-### Set build-time variables (--build-arg)
+### Set build-time variables (--build-arg)
You can use `ENV` instructions in a Dockerfile to define variable
values. These values persist in the built image. However, often
@@ -441,13 +441,13 @@ $ docker build --build-arg HTTP_PROXY .
This is similar to how `docker run -e` works. Refer to the [`docker run` documentation](https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file)
for more information.
-### Optional security options (--security-opt)
+### Optional security options (--security-opt)
This flag is only supported on a daemon running on Windows, and only supports
the `credentialspec` option. The `credentialspec` must be in the format
`file://spec.txt` or `registry://keyname`.
-### Specify isolation technology for container (--isolation)
+### Specify isolation technology for container (--isolation)
This option is useful in situations where you are running Docker containers on
Windows. The `--isolation=` option sets a container's isolation
@@ -463,7 +463,7 @@ Linux namespaces. On Microsoft Windows, you can specify these values:
Specifying the `--isolation` flag without a value is the same as setting `--isolation="default"`.
-### Add entries to container hosts file (--add-host)
+### Add entries to container hosts file (--add-host)
You can add other hosts into a container's `/etc/hosts` file by using one or
more `--add-host` flags. This example adds a static address for a host named
@@ -471,7 +471,7 @@ more `--add-host` flags. This example adds a static address for a host named
$ docker build --add-host=docker:10.180.0.1 .
-### Specifying target build stage (--target)
+### Specifying target build stage (--target)
When building a Dockerfile with multiple build stages, `--target` can be used to
specify an intermediate build stage by name as a final stage for the resulting
@@ -489,7 +489,7 @@ FROM alpine AS production-env
$ docker build -t mybuildimage --target build-env .
```
-### Custom build outputs
+### Custom build outputs (--output)
By default, a local container image is created from the build result. The
`--output` (or `-o`) flag allows you to override this behavior, and a specify a
@@ -582,7 +582,7 @@ vndr
> [enable BuildKit](../builder.md#buildkit) or use the [buildx](https://github.com/docker/buildx)
> plugin which provides more output type options.
-### Specifying external cache sources
+### Specifying external cache sources (--cache-from)
In addition to local build cache, the builder can reuse the cache generated from
previous builds with the `--cache-from` flag pointing to an image in the registry.
@@ -625,7 +625,7 @@ $ docker build --cache-from myname/myapp .
> plugin. The previous builder has limited support for reusing cache from
> pre-pulled images.
-### Squash an image's layers (--squash) (experimental)
+### Squash an image's layers (--squash) (experimental)
#### Overview