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

Commit 1cab956

Browse files
Merge pull request #2667 from thaJeztah/19.03_backport_remove_from_index
[19.03 backport] documentation updates Upstream-commit: 675a209afc6f9f152a0d6814979a84602701bf7b Component: cli
2 parents d48744d + efe3cf2 commit 1cab956

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

components/cli/docs/reference/builder.md

Lines changed: 7 additions & 8 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.
@@ -1276,11 +1276,11 @@ COPY test.txt /absoluteDir/
12761276
12771277
When copying files or directories that contain special characters (such as `[`
12781278
and `]`), you need to escape those paths following the Golang rules to prevent
1279-
them from being treated as a matching pattern. For example, to add a file
1279+
them from being treated as a matching pattern. For example, to copy a file
12801280
named `arr[0].txt`, use the following;
12811281
12821282
```dockerfile
1283-
ADD arr[[]0].txt /mydir/
1283+
COPY arr[[]0].txt /mydir/
12841284
```
12851285
12861286
All new files and directories are created with a UID and GID of 0, unless the
@@ -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)