Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/moby/buildkit into improv…
Browse files Browse the repository at this point in the history
…e-ruleset-messages

Signed-off-by: Felipe Santos <[email protected]>
  • Loading branch information
felipecrs committed Oct 31, 2024
2 parents 6d26769 + 354f2d1 commit 7438264
Show file tree
Hide file tree
Showing 21 changed files with 41 additions and 25 deletions.
6 changes: 1 addition & 5 deletions frontend/dockerfile/docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ despite warnings. To make the build fail on warnings, set `#check=error=true`.

> [!NOTE]
> When using the `check` directive, with `error=true` option, it is recommended
> to pin the [Dockerfile syntax]((#syntax)) to a specific version. Otherwise, your build may
> to pin the [Dockerfile syntax](#syntax) to a specific version. Otherwise, your build may
> start to fail when new checks are added in the future versions.
To combine both the `skip` and `error` options, use a semi-colon to separate
Expand Down Expand Up @@ -943,7 +943,6 @@ The command is run in the host's network environment (similar to
> which needs to be enabled when starting the buildkitd daemon with
> `--allow-insecure-entitlement network.host` flag or in [buildkitd config](https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md),
> and for a build request with [`--allow network.host` flag](https://docs.docker.com/engine/reference/commandline/buildx_build/#allow).
{ .warning }
### RUN --security

Expand All @@ -964,7 +963,6 @@ This is equivalent to running `docker run --privileged`.
> enabled when starting the buildkitd daemon with
> `--allow-insecure-entitlement security.insecure` flag or in [buildkitd config](https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md),
> and for a build request with [`--allow security.insecure` flag](https://docs.docker.com/engine/reference/commandline/buildx_build/#allow).
{ .warning }
Default sandbox mode can be activated via `--security=sandbox`, but that is no-op.

Expand Down Expand Up @@ -2261,7 +2259,6 @@ runtime, runs the relevant `ENTRYPOINT` and `CMD` commands.
>
> On Windows, the user must be created first if it's not a built-in account.
> This can be done with the `net user` command called as part of a Dockerfile.
{ .warning }
```dockerfile
FROM microsoft/windowsservercore
Expand Down Expand Up @@ -2332,7 +2329,6 @@ flag.
>
> Refer to the [`RUN --mount=type=secret`](#run---mounttypesecret) section to
> learn about secure ways to use secrets when building images.
{ .warning }
A Dockerfile may include one or more `ARG` instructions. For example,
the following is a valid Dockerfile:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: ConsistentInstructionCasing
description: All commands within the Dockerfile should use the same casing (either upper or lower)
description: >-
All commands within the Dockerfile should use the same casing (either upper or lower)
aliases:
- /go/dockerfile/rule/consistent-instruction-casing/
---
Expand Down
3 changes: 2 additions & 1 deletion frontend/dockerfile/docs/rules/copy-ignored-file.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: CopyIgnoredFile
description: Attempting to Copy file that is excluded by .dockerignore
description: >-
Attempting to Copy file that is excluded by .dockerignore
aliases:
- /go/dockerfile/rule/copy-ignored-file/
---
Expand Down
3 changes: 2 additions & 1 deletion frontend/dockerfile/docs/rules/duplicate-stage-name.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: DuplicateStageName
description: Stage names should be unique
description: >-
Stage names should be unique
aliases:
- /go/dockerfile/rule/duplicate-stage-name/
---
Expand Down
3 changes: 2 additions & 1 deletion frontend/dockerfile/docs/rules/from-as-casing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: FromAsCasing
description: The AS keyword should match the case of the FROM keyword
description: >-
The AS keyword should match the case of the FROM keyword
aliases:
- /go/dockerfile/rule/from-as-casing/
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: FromPlatformFlagConstDisallowed
description: FROM --platform flag should not use a constant value
description: >-
FROM --platform flag should not use a constant value
aliases:
- /go/dockerfile/rule/from-platform-flag-const-disallowed/
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: InvalidDefaultArgInFrom
description: Default value for global ARG results in an empty or invalid base image name
description: >-
Default value for global ARG results in an empty or invalid base image name
aliases:
- /go/dockerfile/rule/invalid-default-arg-in-from/
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: InvalidDefinitionDescription
description: Comment for build stage or argument should follow the format: `# <arg/stage name> <description>`. If this is not intended to be a description comment, add an empty line or comment between the instruction and the comment.
description: >-
Comment for build stage or argument should follow the format: `# <arg/stage name> <description>`. If this is not intended to be a description comment, add an empty line or comment between the instruction and the comment.
aliases:
- /go/dockerfile/rule/invalid-definition-description/
---
Expand Down
3 changes: 2 additions & 1 deletion frontend/dockerfile/docs/rules/json-args-recommended.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: JSONArgsRecommended
description: JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals
description: >-
JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals
aliases:
- /go/dockerfile/rule/json-args-recommended/
---
Expand Down
3 changes: 2 additions & 1 deletion frontend/dockerfile/docs/rules/legacy-key-value-format.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: LegacyKeyValueFormat
description: Legacy key/value format with whitespace separator should not be used
description: >-
Legacy key/value format with whitespace separator should not be used
aliases:
- /go/dockerfile/rule/legacy-key-value-format/
---
Expand Down
3 changes: 2 additions & 1 deletion frontend/dockerfile/docs/rules/maintainer-deprecated.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: MaintainerDeprecated
description: The MAINTAINER instruction is deprecated, use a label instead to define an image author
description: >-
The MAINTAINER instruction is deprecated, use a label instead to define an image author
aliases:
- /go/dockerfile/rule/maintainer-deprecated/
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: MultipleInstructionsDisallowed
description: Multiple instructions of the same type should not be used in the same stage
description: >-
Multiple instructions of the same type should not be used in the same stage
aliases:
- /go/dockerfile/rule/multiple-instructions-disallowed/
---
Expand Down
3 changes: 2 additions & 1 deletion frontend/dockerfile/docs/rules/no-empty-continuation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: NoEmptyContinuation
description: Empty continuation lines will become errors in a future release
description: >-
Empty continuation lines will become errors in a future release
aliases:
- /go/dockerfile/rule/no-empty-continuation/
---
Expand Down
3 changes: 2 additions & 1 deletion frontend/dockerfile/docs/rules/redundant-target-platform.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: RedundantTargetPlatform
description: Setting platform to predefined $TARGETPLATFORM in FROM is redundant as this is the default behavior
description: >-
Setting platform to predefined $TARGETPLATFORM in FROM is redundant as this is the default behavior
aliases:
- /go/dockerfile/rule/redundant-target-platform/
---
Expand Down
3 changes: 2 additions & 1 deletion frontend/dockerfile/docs/rules/reserved-stage-name.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: ReservedStageName
description: Reserved words should not be used as stage names
description: >-
Reserved words should not be used as stage names
aliases:
- /go/dockerfile/rule/reserved-stage-name/
---
Expand Down
3 changes: 2 additions & 1 deletion frontend/dockerfile/docs/rules/secrets-used-in-arg-or-env.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: SecretsUsedInArgOrEnv
description: Sensitive data should not be used in the ARG or ENV commands
description: >-
Sensitive data should not be used in the ARG or ENV commands
aliases:
- /go/dockerfile/rule/secrets-used-in-arg-or-env/
---
Expand Down
3 changes: 2 additions & 1 deletion frontend/dockerfile/docs/rules/stage-name-casing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: StageNameCasing
description: Stage names should be lowercase
description: >-
Stage names should be lowercase
aliases:
- /go/dockerfile/rule/stage-name-casing/
---
Expand Down
3 changes: 2 additions & 1 deletion frontend/dockerfile/docs/rules/undefined-arg-in-from.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: UndefinedArgInFrom
description: FROM command must use declared ARGs
description: >-
FROM command must use declared ARGs
aliases:
- /go/dockerfile/rule/undefined-arg-in-from/
---
Expand Down
3 changes: 2 additions & 1 deletion frontend/dockerfile/docs/rules/undefined-var.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: UndefinedVar
description: Variables should be defined before their use
description: >-
Variables should be defined before their use
aliases:
- /go/dockerfile/rule/undefined-var/
---
Expand Down
3 changes: 2 additions & 1 deletion frontend/dockerfile/docs/rules/workdir-relative-path.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: WorkdirRelativePath
description: Relative workdir without an absolute workdir declared within the build can have unexpected results if the base image changes
description: >-
Relative workdir without an absolute workdir declared within the build can have unexpected results if the base image changes
aliases:
- /go/dockerfile/rule/workdir-relative-path/
---
Expand Down
3 changes: 2 additions & 1 deletion frontend/dockerfile/linter/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ type Rule struct {

const tmplStr = `---
title: {{ .Rule.Name }}
description: {{ .Rule.Description }}
description: >-
{{ .Rule.Description }}
{{- if .Rule.URLAlias }}
aliases:
- {{ .Rule.URLAlias }}
Expand Down

0 comments on commit 7438264

Please sign in to comment.