Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit a438db9

Browse files
tonistiigithaJeztah
authored andcommitted
docs: remove docs for —-from=index
Naming stages is the preferred method for using multi-stage builds. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com> (cherry picked from commit 5dd9bd4c2cead98c1b183402a172dd0d488703ae) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 9152bf265ee53a60a6d141cc294bf14cd899c7f9 Component: cli
1 parent 07d59f4 commit a438db9

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

components/cli/docs/reference/builder.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ the [*Public Repositories*](https://docs.docker.com/engine/tutorials/dockerrepos
666666
instructions.
667667
- Optionally a name can be given to a new build stage by adding `AS name` to the
668668
`FROM` instruction. The name can be used in subsequent `FROM` and
669-
`COPY --from=<name|index>` instructions to refer to the image built in this stage.
669+
`COPY --from=<name>` instructions to refer to the image built in this stage.
670670
- The `tag` or `digest` values are optional. If you omit either of them, the
671671
builder assumes a `latest` tag by default. The builder returns an error if it
672672
cannot find the `tag` value.
@@ -1311,12 +1311,11 @@ no lookup and does not depend on container root filesystem content.
13111311
> If you build using STDIN (`docker build - < somefile`), there is no
13121312
> build context, so `COPY` can't be used.
13131313
1314-
Optionally `COPY` accepts a flag `--from=<name|index>` that can be used to set
1314+
Optionally `COPY` accepts a flag `--from=<name>` that can be used to set
13151315
the source location to a previous build stage (created with `FROM .. AS <name>`)
1316-
that will be used instead of a build context sent by the user. The flag also
1317-
accepts a numeric index assigned for all previous build stages started with
1318-
`FROM` instruction. In case a build stage with a specified name can't be found an
1319-
image with the same name is attempted to be used instead.
1316+
that will be used instead of a build context sent by the user. In case a build
1317+
stage with a specified name can't be found an image with the same name is
1318+
attempted to be used instead.
13201319
13211320
`COPY` obeys the following rules:
13221321

0 commit comments

Comments
 (0)