mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-29 08:57:44 +08:00
Merge pull request #1230 from crazy-max/docs-color-ouput
docs(guide): color output controls
This commit is contained in:
commit
97d3841fbf
24
docs/guides/color-output.md
Normal file
24
docs/guides/color-output.md
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
title: "Color output controls"
|
||||||
|
description: "Modifying colors of progress output"
|
||||||
|
keywords: build, buildx, buildkit
|
||||||
|
---
|
||||||
|
|
||||||
|
Buildx has support for modifying the colors that are used to output information
|
||||||
|
to the terminal. You can set the environment variable `BUILDKIT_COLORS` to
|
||||||
|
something like `run=123,20,245:error=yellow:cancel=blue:warning=white` to set
|
||||||
|
the colors that you would like to use:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Setting `NO_COLOR` to anything will disable any colorized output as recommended
|
||||||
|
by [no-color.org](https://no-color.org/):
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
> **Note**
|
||||||
|
>
|
||||||
|
> Parsing errors will be reported but ignored. This will result in default
|
||||||
|
> color values being used where needed.
|
||||||
|
|
||||||
|
See also [the list of pre-defined colors](https://github.com/moby/buildkit/blob/master/util/progress/progressui/colors.go).
|
@ -121,26 +121,7 @@ $ docker buildx bake -f docker-bake.hcl --print db
|
|||||||
|
|
||||||
### <a name="progress"></a> Set type of progress output (--progress)
|
### <a name="progress"></a> Set type of progress output (--progress)
|
||||||
|
|
||||||
Same as [`build --progress`](buildx_build.md#progress). Set type of progress
|
Same as [`build --progress`](buildx_build.md#progress).
|
||||||
output (auto, plain, tty). Use plain to show container output (default "auto").
|
|
||||||
|
|
||||||
> You can also use the `BUILDKIT_PROGRESS` environment variable to set its value.
|
|
||||||
|
|
||||||
The following example uses `plain` output during the build:
|
|
||||||
|
|
||||||
```console
|
|
||||||
$ docker buildx bake --progress=plain
|
|
||||||
|
|
||||||
#2 [backend internal] load build definition from Dockerfile.test
|
|
||||||
#2 sha256:de70cb0bb6ed8044f7b9b1b53b67f624e2ccfb93d96bb48b70c1fba562489618
|
|
||||||
#2 ...
|
|
||||||
|
|
||||||
#1 [database internal] load build definition from Dockerfile.test
|
|
||||||
#1 sha256:453cb50abd941762900a1212657a35fc4aad107f5d180b0ee9d93d6b74481bce
|
|
||||||
#1 transferring dockerfile: 36B done
|
|
||||||
#1 DONE 0.1s
|
|
||||||
...
|
|
||||||
```
|
|
||||||
|
|
||||||
### <a name="pull"></a> Always attempt to pull a newer version of the image (--pull)
|
### <a name="pull"></a> Always attempt to pull a newer version of the image (--pull)
|
||||||
|
|
||||||
|
@ -415,8 +415,9 @@ $ docker buildx build --platform=darwin .
|
|||||||
Set type of progress output (auto, plain, tty). Use plain to show container
|
Set type of progress output (auto, plain, tty). Use plain to show container
|
||||||
output (default "auto").
|
output (default "auto").
|
||||||
|
|
||||||
> You can also use the `BUILDKIT_PROGRESS` environment variable to set
|
> **Note**
|
||||||
> its value.
|
>
|
||||||
|
> You can also use the `BUILDKIT_PROGRESS` environment variable to set its value.
|
||||||
|
|
||||||
The following example uses `plain` output during the build:
|
The following example uses `plain` output during the build:
|
||||||
|
|
||||||
@ -433,6 +434,11 @@ $ docker buildx build --load --progress=plain .
|
|||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> **Note**
|
||||||
|
>
|
||||||
|
> Check also our [Color output controls guide](https://docs.docker.com/build/guides/color-output/)
|
||||||
|
> for modifying the colors that are used to output information to the terminal.
|
||||||
|
|
||||||
### <a name="push"></a> Push the build result to a registry (--push)
|
### <a name="push"></a> Push the build result to a registry (--push)
|
||||||
|
|
||||||
Shorthand for [`--output=type=registry`](#registry). Will automatically push the
|
Shorthand for [`--output=type=registry`](#registry). Will automatically push the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user