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

Commit 4a3bea6

Browse files
Merge component 'cli' from git@github.com:docker/cli 19.03
2 parents de66663 + 1cab956 commit 4a3bea6

2 files changed

Lines changed: 12 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

components/cli/docs/reference/commandline/build.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ Build Syntax Suffix | Commit Used | Build Context Used
110110
`myrepo.git#mytag:myfolder` | `refs/tags/mytag` | `/myfolder`
111111
`myrepo.git#mybranch:myfolder` | `refs/heads/mybranch` | `/myfolder`
112112

113+
> **Note**
114+
>
115+
> You cannot specify the build-context directory (`myfolder` in the examples above)
116+
> when using BuildKit as builder (`DOCKER_BUILDKIT=1`). Support for this feature
117+
> is tracked in [buildkit#1684](https://github.com/moby/buildkit/issues/1684).
113118
114119
### Tarball contexts
115120

0 commit comments

Comments
 (0)