docs: refactor bake file reference

Signed-off-by: David Karlsson <david.karlsson@docker.com>
This commit is contained in:
David Karlsson 2023-04-20 21:01:55 +02:00 committed by Justin Chadwell
parent 0589f69206
commit f8483d7243
5 changed files with 722 additions and 405 deletions

View File

@ -593,7 +593,7 @@ type Target struct {
NoCache *bool `json:"no-cache,omitempty" hcl:"no-cache,optional" cty:"no-cache"`
NetworkMode *string `json:"-" hcl:"-" cty:"-"`
NoCacheFilter []string `json:"no-cache-filter,omitempty" hcl:"no-cache-filter,optional" cty:"no-cache-filter"`
// IMPORTANT: if you add more fields here, do not forget to update newOverrides and docs/manuals/bake/file-definition.md.
// IMPORTANT: if you add more fields here, do not forget to update newOverrides and docs/bake-reference.md.
// linked is a private field to mark a target used as a linked one
linked bool

View File

@ -144,7 +144,7 @@ func runBake(dockerCli command.Cli, targets []string, in bakeOptions, cFlags com
tgts, grps, err := bake.ReadTargets(ctx, files, targets, overrides, map[string]string{
// don't forget to update documentation if you add a new
// built-in variable: docs/manuals/bake/file-definition.md#built-in-variables
// built-in variable: docs/bake-reference.md#built-in-variables
"BAKE_CMD_CONTEXT": cmdContext,
"BAKE_LOCAL_PLATFORM": platforms.DefaultString(),
})

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,3 @@
# Bake file definition
This page has moved to [Docker Docs website](https://docs.docker.com/build/bake/file-definition)
This page has moved to [docs/bake-reference.md](../../bake-reference.md)

View File

@ -87,8 +87,8 @@ target "db" {
$ docker buildx bake -f docker-bake.dev.hcl db webapp-release
```
See our [file definition](https://docs.docker.com/build/bake/file-definition/)
guide for more details.
See the [Bake file reference](https://docs.docker.com/build/bake/reference/)
for more details.
### <a name="no-cache"></a> Do not use cache when building the image (--no-cache)