From 2da2d5eb4ae3f7815b01ee9b0f8ea1ebedd113ca Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Tue, 25 Oct 2022 19:58:58 +0200 Subject: [PATCH] engine: update reference docs with latest changes from 20.10 branch Signed-off-by: CrazyMax --- _data/engine-cli/docker_build.yaml | 25 +++++++++++++------------ _data/engine-cli/docker_run.yaml | 11 ++++++----- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/_data/engine-cli/docker_build.yaml b/_data/engine-cli/docker_build.yaml index 6c5836b755..bbdfca7014 100644 --- a/_data/engine-cli/docker_build.yaml +++ b/_data/engine-cli/docker_build.yaml @@ -561,13 +561,13 @@ examples: |- uploaded context. The builder reference contains detailed information on [creating a .dockerignore file](../builder.md#dockerignore-file). - When using the [BuildKit backend](../builder.md#buildkit), `docker build` searches - for a `.dockerignore` file relative to the Dockerfile name. For example, running - `docker build -f myapp.Dockerfile .` will first look for an ignore file named - `myapp.Dockerfile.dockerignore`. If such a file is not found, the `.dockerignore` - file is used if present. Using a Dockerfile based `.dockerignore` is useful if a - project contains multiple Dockerfiles that expect to ignore different sets of - files. + When using the [BuildKit backend](https://docs.docker.com/build/buildkit/), + `docker build` searches for a `.dockerignore` file relative to the Dockerfile + name. For example, running `docker build -f myapp.Dockerfile .` will first look + for an ignore file named `myapp.Dockerfile.dockerignore`. If such a file is not + found, the `.dockerignore` file is used if present. Using a Dockerfile based + `.dockerignore` is useful if a project contains multiple Dockerfiles that + expect to ignore different sets of files. ### Tag an image (-t) @@ -823,8 +823,9 @@ examples: |- > **Note** > > This feature requires the BuildKit backend. You can either - > [enable BuildKit](../builder.md#buildkit) or use the [buildx](https://github.com/docker/buildx) - > plugin which provides more output type options. + > [enable BuildKit](https://docs.docker.com/build/buildkit/#getting-started) or + > use the [buildx](https://github.com/docker/buildx) plugin which provides more + > output type options. ### Specifying external cache sources @@ -865,9 +866,9 @@ examples: |- > **Note** > > This feature requires the BuildKit backend. You can either - > [enable BuildKit](../builder.md#buildkit) or use the [buildx](https://github.com/docker/buildx) - > plugin. The previous builder has limited support for reusing cache from - > pre-pulled images. + > [enable BuildKit](https://docs.docker.com/build/buildkit/#getting-started) or + > use the [buildx](https://github.com/docker/buildx) plugin. The previous + > builder has limited support for reusing cache from pre-pulled images. ### Squash an image's layers (--squash) (experimental) diff --git a/_data/engine-cli/docker_run.yaml b/_data/engine-cli/docker_run.yaml index b0c6fcfac5..067fff38ef 100644 --- a/_data/engine-cli/docker_run.yaml +++ b/_data/engine-cli/docker_run.yaml @@ -1352,14 +1352,15 @@ examples: |- ### Add host device to container (--device) ```console - $ docker run --device=/dev/sdc:/dev/xvdc \ - --device=/dev/sdd --device=/dev/zero:/dev/nulo \ - -i -t \ - ubuntu ls -l /dev/{xvdc,sdd,nulo} + $ docker run -it --rm \ + --device=/dev/sdc:/dev/xvdc \ + --device=/dev/sdd \ + --device=/dev/zero:/dev/foobar \ + ubuntu ls -l /dev/{xvdc,sdd,foobar} brw-rw---- 1 root disk 8, 2 Feb 9 16:05 /dev/xvdc brw-rw---- 1 root disk 8, 3 Feb 9 16:05 /dev/sdd - crw-rw-rw- 1 root root 1, 5 Feb 9 16:05 /dev/nulo + crw-rw-rw- 1 root root 1, 5 Feb 9 16:05 /dev/foobar ``` It is often necessary to directly expose devices to a container. The `--device`