Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: make buildx build the canonical build #19774

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/build/building/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ as part of your build. `ADD` is better than manually adding files using
something like `wget` and `tar`, because it ensures a more precise build cache.
`ADD` also has built-in support for checksum validation of the remote
resources, and a protocol for parsing branches, tags, and subdirectories from
[Git URLs](../../reference/cli/docker/image/build.md#git-repositories).
[Git URLs](../../reference/cli/docker/buildx/build.md#git-repositories).

The following example uses `ADD` to download a .NET installer. Combined with
multi-stage builds, only the .NET runtime remains in the final stage, no
Expand Down
2 changes: 1 addition & 1 deletion content/build/building/packaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Some projects may need distinct Dockerfiles for specific purposes. A common
convention is to name these `<something>.Dockerfile`. You can specify the
Dockerfile filename using the `--file` flag for the `docker build` command.
Refer to the
[`docker build` CLI reference](../../reference/cli/docker/image/build.md#file)
[`docker build` CLI reference](../../reference/cli/docker/buildx/build.md#file)
to learn about the `--file` flag.

> **Note**
Expand Down
2 changes: 1 addition & 1 deletion content/build/building/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ $ docker build --build-arg NODE_VERSION=current .
For more information on how to use build arguments, refer to:

- [`ARG` Dockerfile reference](../../reference/dockerfile.md#arg)
- [`docker build --build-arg` reference](../../reference/cli/docker/image/build.md#build-arg)
- [`docker build --build-arg` reference](../../reference/cli/docker/buildx/build.md#build-arg)

## `ENV` usage example

Expand Down
2 changes: 1 addition & 1 deletion content/build/guide/export.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ This is explored later on in this guide.

Related information:

- [`docker build --output` CLI reference](../../reference/cli/docker/image/build.md#output)
- [`docker build --output` CLI reference](../../reference/cli/docker/buildx/build.md#output)
- [Build exporters](../exporters/index.md)

## Next steps
Expand Down
2 changes: 1 addition & 1 deletion content/build/guide/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ container image and created a container from it.
Related information:

- [Dockerfile reference](../../reference/dockerfile.md)
- [`docker build` CLI reference](../../reference/cli/docker/image/build.md)
- [`docker build` CLI reference](../../reference/cli/docker/buildx/build.md)
- [`docker run` CLI reference](../../reference/cli/docker/container/run.md)

## Next steps
Expand Down
4 changes: 2 additions & 2 deletions content/docker-hub/builds/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@

> **Important**
>
> A `hooks/build` file overrides the basic [docker build](../../reference/cli/docker/image/build.md) command used by the builder, so you must include a similar build command in the hook or
> A `hooks/build` file overrides the basic `docker build` command used by the builder, so you must include a similar build command in the hook or
the automated build fails.
{ .important }

Refer to the [docker build documentation](../../reference/cli/docker/image/build.md#build-arg)
Refer to the [docker build documentation](../../reference/cli/docker/buildx/build.md#build-arg)

Check failure on line 122 in content/docker-hub/builds/advanced.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'Docker' instead of 'docker'. Raw Output: {"message": "[Vale.Terms] Use 'Docker' instead of 'docker'.", "location": {"path": "content/docker-hub/builds/advanced.md", "range": {"start": {"line": 122, "column": 15}}}, "severity": "ERROR"}
to learn more about Docker build-time variables.

#### Push to multiple repositories
Expand Down
2 changes: 1 addition & 1 deletion content/guides/use-case/nlp/language-translation.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
this case) is sent to the Docker daemon to enable the build. It includes
all the files and subdirectories in the specified directory.

For more details, see the [docker build CLI reference](/reference/cli/docker/image/build/).
For more details, see the [docker build CLI reference](/reference/cli/docker/buildx/build/).

Check failure on line 265 in content/guides/use-case/nlp/language-translation.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'Docker' instead of 'docker'. Raw Output: {"message": "[Vale.Terms] Use 'Docker' instead of 'docker'.", "location": {"path": "content/guides/use-case/nlp/language-translation.md", "range": {"start": {"line": 265, "column": 31}}}, "severity": "ERROR"}

Docker outputs several logs to your console as it builds the image. You'll
see it download and install the dependencies. Depending on your network
Expand Down
2 changes: 1 addition & 1 deletion content/guides/use-case/nlp/named-entity-recognition.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
this case) is sent to the Docker daemon to enable the build. It includes
all the files and subdirectories in the specified directory.

For more details, see the [docker build CLI reference](/reference/cli/docker/image/build/).
For more details, see the [docker build CLI reference](/reference/cli/docker/buildx/build/).

Check failure on line 272 in content/guides/use-case/nlp/named-entity-recognition.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'Docker' instead of 'docker'. Raw Output: {"message": "[Vale.Terms] Use 'Docker' instead of 'docker'.", "location": {"path": "content/guides/use-case/nlp/named-entity-recognition.md", "range": {"start": {"line": 272, "column": 31}}}, "severity": "ERROR"}

Docker outputs several logs to your console as it builds the image. You'll
see it download and install the dependencies. Depending on your network
Expand Down
2 changes: 1 addition & 1 deletion content/guides/use-case/nlp/sentiment-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@
feature, so subsequent builds can be faster. The console will
return to the prompt when it's complete.

For more details, see the [docker build CLI reference](/reference/cli/docker/image/build/).
For more details, see the [docker build CLI reference](/reference/cli/docker/buildx/build/).

Check failure on line 290 in content/guides/use-case/nlp/sentiment-analysis.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'Docker' instead of 'docker'. Raw Output: {"message": "[Vale.Terms] Use 'Docker' instead of 'docker'.", "location": {"path": "content/guides/use-case/nlp/sentiment-analysis.md", "range": {"start": {"line": 290, "column": 31}}}, "severity": "ERROR"}

2. Run the image as a container.

Expand Down
2 changes: 1 addition & 1 deletion content/guides/use-case/nlp/text-classification.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@
this case) is sent to the Docker daemon to enable the build. It includes
all the files and subdirectories in the specified directory.

For more details, see the [docker build CLI reference](/reference/cli/docker/image/build/).
For more details, see the [docker build CLI reference](/reference/cli/docker/buildx/build/).

Check failure on line 344 in content/guides/use-case/nlp/text-classification.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'Docker' instead of 'docker'. Raw Output: {"message": "[Vale.Terms] Use 'Docker' instead of 'docker'.", "location": {"path": "content/guides/use-case/nlp/text-classification.md", "range": {"start": {"line": 344, "column": 31}}}, "severity": "ERROR"}

Docker outputs several logs to your console as it builds the image. You'll
see it download and install the dependencies. Depending on your network
Expand Down
2 changes: 1 addition & 1 deletion content/guides/use-case/nlp/text-summarization.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
this case) is sent to the Docker daemon to enable the build. It includes
all the files and subdirectories in the specified directory.

For more details, see the [docker build CLI reference](/reference/cli/docker/image/build/).
For more details, see the [docker build CLI reference](/reference/cli/docker/buildx/build/).

Check failure on line 279 in content/guides/use-case/nlp/text-summarization.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'Docker' instead of 'docker'. Raw Output: {"message": "[Vale.Terms] Use 'Docker' instead of 'docker'.", "location": {"path": "content/guides/use-case/nlp/text-summarization.md", "range": {"start": {"line": 279, "column": 31}}}, "severity": "ERROR"}

Docker outputs several logs to your console as it builds the image. You'll
see it download and install the dependencies. Depending on your network
Expand Down
2 changes: 1 addition & 1 deletion content/language/rust/build-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
- [Dockerfile reference](../../reference/dockerfile.md)
- [.dockerignore file](../../reference/dockerfile.md#dockerignore-file)
- [docker init CLI reference](../../reference/cli/docker/init.md)
- [docker build CLI reference](../../reference/cli/docker/image/build.md)
- [docker build CLI reference](../../reference/cli/docker/buildx/build.md)

Check failure on line 177 in content/language/rust/build-images.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'Docker' instead of 'docker'. Raw Output: {"message": "[Vale.Terms] Use 'Docker' instead of 'docker'.", "location": {"path": "content/language/rust/build-images.md", "range": {"start": {"line": 177, "column": 5}}}, "severity": "ERROR"}


## Next steps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,7 @@
datafolder: engine-cli
datafile: docker_image_build
linkTitle: docker build
title: docker image build
aliases:
- /edge/engine/reference/commandline/image_build/
- /engine/reference/commandline/image_build/
- /engine/reference/commandline/build/
- /engine/reference/commandline/builder_build/
- /reference/cli/docker/build/
- /reference/cli/docker/builder/build/
title: docker build (legacy builder)
layout: cli
---

Expand Down
7 changes: 7 additions & 0 deletions content/reference/cli/docker/buildx/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ title: docker buildx build
layout: cli
aliases:
- /engine/reference/commandline/buildx_build/
- /edge/engine/reference/commandline/image_build/
- /engine/reference/commandline/image_build/
- /engine/reference/commandline/build/
- /engine/reference/commandline/builder_build/
- /reference/cli/docker/build/
- /reference/cli/docker/builder/build/
- /reference/cli/docker/image/build/
---

<!--
Expand Down
9 changes: 8 additions & 1 deletion data/engine-cli/docker_build.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
command: docker build
aliases: docker image build, docker build, docker buildx build, docker builder build
aliases: docker image build, docker build, docker builder build
short: Build an image from a Dockerfile
long: Build an image from a Dockerfile
usage: docker build [OPTIONS] PATH | URL | -
Expand All @@ -9,6 +9,7 @@ options:
- option: add-host
value_type: list
description: Add a custom host-to-IP mapping (`host:ip`)
details_url: /reference/cli/docker/buildx/build/#add-host
deprecated: false
hidden: false
experimental: false
Expand All @@ -18,6 +19,7 @@ options:
- option: build-arg
value_type: list
description: Set build-time variables
details_url: /reference/cli/docker/buildx/build/#build-arg
deprecated: false
hidden: false
experimental: false
Expand All @@ -37,6 +39,7 @@ options:
- option: cgroup-parent
value_type: string
description: Set the parent cgroup for the `RUN` instructions during build
details_url: /reference/cli/docker/buildx/build/#cgroup-parent
deprecated: false
hidden: false
experimental: false
Expand Down Expand Up @@ -116,6 +119,7 @@ options:
shorthand: f
value_type: string
description: Name of the Dockerfile (Default is `PATH/Dockerfile`)
details_url: /reference/cli/docker/buildx/build/#file
deprecated: false
hidden: false
experimental: false
Expand Down Expand Up @@ -184,6 +188,7 @@ options:
value_type: string
default_value: default
description: Set the networking mode for the RUN instructions during build
details_url: /reference/cli/docker/buildx/build/#network
deprecated: false
hidden: false
min_api_version: "1.25"
Expand Down Expand Up @@ -277,6 +282,7 @@ options:
shorthand: t
value_type: list
description: Name and optionally a tag in the `name:tag` format
details_url: /reference/cli/docker/buildx/build/#tag
deprecated: false
hidden: false
experimental: false
Expand All @@ -286,6 +292,7 @@ options:
- option: target
value_type: string
description: Set the target build stage to build.
details_url: /reference/cli/docker/buildx/build/#target
deprecated: false
hidden: false
experimental: false
Expand Down
9 changes: 8 additions & 1 deletion data/engine-cli/docker_builder_build.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
command: docker builder build
aliases: docker image build, docker build, docker buildx build, docker builder build
aliases: docker image build, docker build, docker builder build
short: Build an image from a Dockerfile
long: |
See [docker build](/reference/cli/docker/image/build/) for more information.
Expand All @@ -10,6 +10,7 @@ options:
- option: add-host
value_type: list
description: Add a custom host-to-IP mapping (`host:ip`)
details_url: /reference/cli/docker/buildx/build/#add-host
deprecated: false
hidden: false
experimental: false
Expand All @@ -19,6 +20,7 @@ options:
- option: build-arg
value_type: list
description: Set build-time variables
details_url: /reference/cli/docker/buildx/build/#build-arg
deprecated: false
hidden: false
experimental: false
Expand All @@ -38,6 +40,7 @@ options:
- option: cgroup-parent
value_type: string
description: Set the parent cgroup for the `RUN` instructions during build
details_url: /reference/cli/docker/buildx/build/#cgroup-parent
deprecated: false
hidden: false
experimental: false
Expand Down Expand Up @@ -117,6 +120,7 @@ options:
shorthand: f
value_type: string
description: Name of the Dockerfile (Default is `PATH/Dockerfile`)
details_url: /reference/cli/docker/buildx/build/#file
deprecated: false
hidden: false
experimental: false
Expand Down Expand Up @@ -185,6 +189,7 @@ options:
value_type: string
default_value: default
description: Set the networking mode for the RUN instructions during build
details_url: /reference/cli/docker/buildx/build/#network
deprecated: false
hidden: false
min_api_version: "1.25"
Expand Down Expand Up @@ -278,6 +283,7 @@ options:
shorthand: t
value_type: list
description: Name and optionally a tag in the `name:tag` format
details_url: /reference/cli/docker/buildx/build/#tag
deprecated: false
hidden: false
experimental: false
Expand All @@ -287,6 +293,7 @@ options:
- option: target
value_type: string
description: Set the target build stage to build.
details_url: /reference/cli/docker/buildx/build/#target
deprecated: false
hidden: false
experimental: false
Expand Down
Loading