From 17d4106e1bdd47452a99c47f76fe33103fb48c80 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 13 Jan 2021 17:18:10 +0100 Subject: [PATCH] docs: fix markdown formatting and highlighting Signed-off-by: Sebastiaan van Stijn --- docs/reference/buildx_bake.md | 19 +++++---- docs/reference/buildx_build.md | 46 ++++++++++----------- docs/reference/buildx_create.md | 16 +++---- docs/reference/buildx_imagetools_create.md | 6 +-- docs/reference/buildx_imagetools_inspect.md | 5 ++- docs/reference/buildx_ls.md | 2 +- 6 files changed, 48 insertions(+), 46 deletions(-) diff --git a/docs/reference/buildx_bake.md b/docs/reference/buildx_bake.md index 1f4a5f5b..71e9e1b0 100644 --- a/docs/reference/buildx_bake.md +++ b/docs/reference/buildx_bake.md @@ -135,14 +135,14 @@ Same as `build --pull`. Override target configurations from command line. The pattern matching syntax is defined in https://golang.org/pkg/path/#Match. -Example: +**Examples** ```console -docker buildx bake --set target.args.mybuildarg=value -docker buildx bake --set target.platform=linux/arm64 -docker buildx bake --set foo*.args.mybuildarg=value # overrides build arg for all targets starting with 'foo' -docker buildx bake --set *.platform=linux/arm64 # overrides platform for all targets -docker buildx bake --set foo*.no-cache # bypass caching only for targets starting with 'foo' +$ docker buildx bake --set target.args.mybuildarg=value +$ docker buildx bake --set target.platform=linux/arm64 +$ docker buildx bake --set foo*.args.mybuildarg=value # overrides build arg for all targets starting with 'foo' +$ docker buildx bake --set *.platform=linux/arm64 # overrides platform for all targets +$ docker buildx bake --set foo*.no-cache # bypass caching only for targets starting with 'foo' ``` Complete list of overridable fields: @@ -170,7 +170,7 @@ Note: Design of bake command is work in progress, the user experience may change based on feedback. -Example HCL definition: +**Example HCL definition** ```hcl group "default" { @@ -194,8 +194,9 @@ target "db" { ``` Complete list of valid target fields: -args, cache-from, cache-to, context, dockerfile, inherits, labels, no-cache, -output, platform, pull, secrets, ssh, tags, target + +`args`, `cache-from`, `cache-to`, `context`, `dockerfile`, `inherits`, `labels`, +`no-cache`, `output`, `platform`, `pull`, `secrets`, `ssh`, `tags`, `target` ### HCL variables and functions diff --git a/docs/reference/buildx_build.md b/docs/reference/buildx_build.md index 4862c94a..571edad0 100644 --- a/docs/reference/buildx_build.md +++ b/docs/reference/buildx_build.md @@ -76,12 +76,12 @@ for the full description of automatic platform argument variants . The formatting for the platform specifier is defined in the [containerd source code](https://github.com/containerd/containerd/blob/v1.4.3/platforms/platforms.go#L63). -Examples: +**Examples** ```console -docker buildx build --platform=linux/arm64 . -docker buildx build --platform=linux/amd64,linux/arm64,linux/arm/v7 . -docker buildx build --platform=darwin . +$ docker buildx build --platform=linux/arm64 . +$ docker buildx build --platform=linux/amd64,linux/arm64,linux/arm/v7 . +$ docker buildx build --platform=darwin . ``` ### Set the export action for the build result (-o, --output) @@ -102,15 +102,15 @@ If just the path is specified as a value, `buildx` will use the local exporter with this path as the destination. If the value is "-", `buildx` will use `tar` exporter and write to `stdout`. -Examples: +**Examples** ```console -docker buildx build -o . . -docker buildx build -o outdir . -docker buildx build -o - - > out.tar -docker buildx build -o type=docker . -docker buildx build -o type=docker,dest=- . > myimage.tar -docker buildx build -t tonistiigi/foo -o type=registry +$ docker buildx build -o . . +$ docker buildx build -o outdir . +$ docker buildx build -o - - > out.tar +$ docker buildx build -o type=docker . +$ docker buildx build -o type=docker,dest=- . > myimage.tar +$ docker buildx build -t tonistiigi/foo -o type=registry ``` Supported exported types are: @@ -201,13 +201,13 @@ If no type is specified, `registry` exporter is used with a specified reference. `docker` driver currently only supports importing build cache from the registry. -Examples: +**Examples** ```console -docker buildx build --cache-from=user/app:cache . -docker buildx build --cache-from=user/app . -docker buildx build --cache-from=type=registry,ref=user/app . -docker buildx build --cache-from=type=local,src=path/to/cache . +$ docker buildx build --cache-from=user/app:cache . +$ docker buildx build --cache-from=user/app . +$ docker buildx build --cache-from=type=registry,ref=user/app . +$ docker buildx build --cache-from=type=local,src=path/to/cache . ``` ### Export build cache to an external cache destination (--cache-to) @@ -231,18 +231,18 @@ Attribute key: exports layers already in the final build stage, “max” exports layers for all stages. Metadata is always exported for the whole build. -Examples: +**Examples** ```console -docker buildx build --cache-to=user/app:cache . -docker buildx build --cache-to=type=inline . -docker buildx build --cache-to=type=registry,ref=user/app . -docker buildx build --cache-to=type=local,dest=path/to/cache . +$ docker buildx build --cache-to=user/app:cache . +$ docker buildx build --cache-to=type=inline . +$ docker buildx build --cache-to=type=registry,ref=user/app . +$ docker buildx build --cache-to=type=local,dest=path/to/cache . ``` ### Allow extra privileged entitlement (--allow) -```console +``` --allow=ENTITLEMENT ``` @@ -255,7 +255,7 @@ Allow extra privileged entitlement. List of entitlements: For entitlements to be enabled, the `buildkitd` daemon also needs to allow them with `--allow-insecure-entitlement` (see [`create --buildkitd-flags`](buildx_create.md#--buildkitd-flags-flags)) -Examples: +**Examples** ```console $ docker buildx create --use --name insecure-builder --buildkitd-flags '--allow-insecure-entitlement security.insecure' diff --git a/docs/reference/buildx_create.md b/docs/reference/buildx_create.md index bd784d1b..3504ddb3 100644 --- a/docs/reference/buildx_create.md +++ b/docs/reference/buildx_create.md @@ -39,7 +39,7 @@ The `--append` flag changes the action of the command to append a new node to an existing builder specified by `--name`. Buildx will choose an appropriate node for a build based on the platforms it supports. -Example: +**Examples** ```console $ docker buildx create mycontext1 @@ -59,9 +59,9 @@ Adds flags when starting the buildkitd daemon. They take precedence over the configuration file specified by [`--config`](#--config-file). See `buildkitd --help` for the available flags. -Example: +**Example** -```console +``` --buildkitd-flags '--debug --debugaddr 0.0.0.0:6666' ``` @@ -127,10 +127,10 @@ The `--leave` flag changes the action of the command to remove a node from a builder. The builder needs to be specified with `--name` and node that is removed is set with `--node`. -Example: +**Examples** ```console -docker buildx create --name mybuilder --node mybuilder0 --leave +$ docker buildx create --name mybuilder --node mybuilder0 --leave ``` ### Specify the name of the builder (--name) @@ -164,11 +164,11 @@ will also automatically detect the platforms it supports, but manual values take priority over the detected ones and can be used when multiple nodes support building for the same platform. -Example: +**Examples** ```console -docker buildx create --platform linux/amd64 -docker buildx create --platform linux/arm64,linux/arm/v8 +$ docker buildx create --platform linux/amd64 +$ docker buildx create --platform linux/arm64,linux/arm/v8 ``` ### Automatically switch to the newly created builder diff --git a/docs/reference/buildx_imagetools_create.md b/docs/reference/buildx_imagetools_create.md index 1fc13157..52cbe42a 100644 --- a/docs/reference/buildx_imagetools_create.md +++ b/docs/reference/buildx_imagetools_create.md @@ -51,10 +51,10 @@ or a JSON of OCI descriptor object. Use the `-t` or `--tag` flag to set the name of the image to be created. -Examples: +**Examples** ```console -docker buildx imagetools create --dry-run alpine@sha256:5c40b3c27b9f13c873fefb2139765c56ce97fd50230f1f2d5c91e55dec171907 sha256:c4ba6347b0e4258ce6a6de2401619316f982b7bcc529f73d2a410d0097730204 +$ docker buildx imagetools create --dry-run alpine@sha256:5c40b3c27b9f13c873fefb2139765c56ce97fd50230f1f2d5c91e55dec171907 sha256:c4ba6347b0e4258ce6a6de2401619316f982b7bcc529f73d2a410d0097730204 -docker buildx imagetools create -t tonistiigi/myapp -f image1 -f image2 +$ docker buildx imagetools create -t tonistiigi/myapp -f image1 -f image2 ``` diff --git a/docs/reference/buildx_imagetools_inspect.md b/docs/reference/buildx_imagetools_inspect.md index b9b4f696..44cae5d8 100644 --- a/docs/reference/buildx_imagetools_inspect.md +++ b/docs/reference/buildx_imagetools_inspect.md @@ -34,6 +34,7 @@ Manifests: ... ``` -### `--raw` +### Show original, unformatted JSON manifest (--raw) -Raw prints the original JSON bytes instead of the formatted output. +Use the `--raw` option to print the original JSON bytes instead of the formatted +output. diff --git a/docs/reference/buildx_ls.md b/docs/reference/buildx_ls.md index 7d4072e5..bb868792 100644 --- a/docs/reference/buildx_ls.md +++ b/docs/reference/buildx_ls.md @@ -13,7 +13,7 @@ Options: Lists all builder instances and the nodes for each instance -Example: +**Example** ```console $ docker buildx ls