Commit Graph

301 Commits

Author SHA1 Message Date
David Karlsson
05cbfd9032 docs: clarify HEALTHCHECK interval behavior during start period
The description of when health checks run was incomplete. During the
start period, checks run at start-interval frequency (default 5s),
not at the regular interval (default 30s).

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2026-03-16 14:37:25 +01:00
David Karlsson
3f366096d3 docs: document ** recursive glob support in COPY --parents
The --parents section only showed simple wildcard examples. Add an
example demonstrating the ** glob pattern, which recursively matches
files across directory levels and is particularly useful with --parents
to preserve deep directory structures.

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2026-03-16 14:37:23 +01:00
David Karlsson
0a7683335f docs: clarify RUN --mount=type=bind rw write discard behavior
The terse note "Written data will be discarded" was unexplained. Expand
it to clarify that writes are discarded when the RUN instruction completes
and are not committed to the image layer.

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2026-03-16 14:37:20 +01:00
David Karlsson
3c5db097cb docs: fix misleading shell form ENTRYPOINT language around CMD args
Replace "prevents CMD command line arguments from being used" with
"ignores CMD and docker run command line arguments", which more accurately
describes the behavior: the arguments are not absent, they just aren't
forwarded to the command inside /bin/sh -c.

Also align with the wording used in the Shell form ENTRYPOINT example
section further down.

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2026-03-16 14:37:17 +01:00
David Karlsson
0c43d9a2a2 docs: clarify exec form CMD should be used with exec form ENTRYPOINT
The previous text said "use either form of CMD" which is technically true
but misleading. When using exec ENTRYPOINT, shell-form CMD wraps the
command in /bin/sh -c, which means ENTRYPOINT receives a shell invocation
rather than the bare arguments. Exec form CMD is the expected pairing.

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2026-03-16 14:37:14 +01:00
David Karlsson
e6948b1e6a docs: clarify STOPSIGNAL applies to docker stop, not keyboard interrupts
STOPSIGNAL only affects the signal sent by docker stop (and the Docker
daemon). Keyboard shortcuts like Ctrl+C send SIGINT directly, independent
of the STOPSIGNAL setting.

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2026-03-16 14:37:12 +01:00
David Karlsson
52e94dfa40 docs: add example showing a previous build stage used as base image
The FROM instruction description mentioned that a named stage can be
referenced in subsequent FROM instructions, but lacked a concrete example
demonstrating this common multi-stage pattern.

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2026-03-16 14:37:09 +01:00
David Karlsson
6d880fe117 docs: clarify that only final stage labels appear in output image
In multi-stage builds, labels from intermediate stages referenced via
COPY --from or RUN --mount=from= are not included in the final output
image.

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2026-03-16 14:37:06 +01:00
David Karlsson
45993262a6 docs: document no-colon variable modifier variants in environment replacement
Add documentation for the `${variable-word}` and `${variable+word}`
modifiers which differ from their colon counterparts (`${variable:-word}`
and `${variable:+word}`) in that they only test whether the variable is
unset, rather than unset or empty.

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2026-03-16 14:37:03 +01:00
CrazyMax
3cee8770b8 history: default to provenance slsa v1 and remove BUILDKIT_HISTORY_PROVENANCE_V1
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-02-19 14:08:46 +01:00
CrazyMax
a12f3aae76 default to provenance slsa v1
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-02-17 13:11:10 +01:00
Tõnis Tiigi
e41f4a84d0 Merge pull request #6430 from dvdksn/chmod-nonoctal-docs
docs: rewrite COPY --chown/--chmod, add non-octal --chmod (labs)
2026-01-09 17:16:38 -08:00
David Karlsson
0af0054a51 docs: rewrite COPY --chown/--chmod, add non-octal --chmod
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2026-01-09 17:48:31 +01:00
Rodolfo Carvalho
2f2458b84b Update apt cache example (fix warning)
Fixes warning from `apt`:

> WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Signed-off-by: Rodolfo Carvalho <rhcarvalho@gmail.com>
2026-01-06 15:44:45 +01:00
Aleksandr Karpinskii
bb7274e948 Clarify what the ARG instruction actually does during build
Signed-off-by: Aleksandr Karpinskii <homm86@gmail.com>
2025-12-11 19:13:08 +04:00
David Karlsson
0981a72503 docs: ADD --checksum supports git sources
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2025-12-02 16:09:45 +01:00
Joyal George K J
a29eef8ed4 Removed unwanted comma from the sentence.
Signed-off-by: Joyal George K J <joyalgeorgekj@gmail.com>
2025-11-21 02:15:11 +05:30
Tõnis Tiigi
3cdcccecdd Merge pull request #6361 from dvdksn/docs-add-unpack-link
docs: add link to ADD --unpack flag and order sections chronologically
2025-11-17 17:47:41 +00:00
David Karlsson
6b01ad9ada docs: add link to ADD --unpack flag and order sections chronologically
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2025-11-14 14:26:38 +01:00
Justin Chadwell
a8e548fbbd Merge pull request #4673 from bpascard/master 2025-11-11 19:27:15 +00:00
Jonathan A. Sternberg
9324520e88 dockerfile: promote RUN --security flag from labs
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2025-11-05 14:46:42 -06:00
Jonathan A. Sternberg
98d0a0a210 dockerfile: promote --parents flag from labs
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2025-11-05 12:52:16 -06:00
David Karlsson
0492d14ada docs: explain ADD --unpack flag
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2025-10-24 11:52:38 +02:00
Tõnis Tiigi
5e2ff2b153 Merge pull request #6223 from damonholden/better_demonstrate_benefits_of_heredocs_in_shell_form
better demonstrate benefits of using heredocs in shell-form
2025-09-25 10:20:50 -07:00
Damon Holden
c2917fa596 reformat heredocs example in reference.md to better show benefit
Signed-off-by: damonholden <damonh003@gmail.com>
2025-09-25 17:48:00 +01:00
Jonathan A. Sternberg
5f01809fec dockerfile: promote --exclude flag from labs
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2025-09-22 12:41:19 -05:00
Sebastiaan van Stijn
7cc4d47efa docs: use latest "labs" for --parents and --exclude
The `--parents` and `--exclude` options have been part of the labs
channel since 1.7, but have not yet been promoted to stable.

Using the 1.7-labs version in these examples means that users would
be downgrading their Dockerfile syntax from 1.17 (soon 1.18.0) to
a much older syntax.

Let's update the notes to use the latest labs syntax so that users
are not surprised by other features no longer being supported when
using the labs syntax.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-01 15:39:31 +02:00
Tõnis Tiigi
070d993324 Merge pull request #6101 from crazy-max/docs-build-name
dockerfile: docs for BUILDKIT_BUILD_NAME built-in build-arg
2025-08-26 19:24:58 +03:00
CrazyMax
aa36c48b64 dockerfile: docs for BUILDKIT_BUILD_NAME built-in build-arg
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-07-23 06:58:00 +02:00
CrazyMax
5dae5a0e88 docs: cdi autoallow and device entitlement
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-07-11 18:19:56 +02:00
CrazyMax
d36487b4a6 history: build arg to opt-in for provenance slsa v1
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-06-11 11:16:24 +02:00
CrazyMax
4da876085a dockerfile: run device docs
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-14 17:12:52 +02:00
David Karlsson
d55dd6742c docs: clarify leading and trailing slashes in add/copy source path
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2025-01-15 14:50:12 +01:00
David Karlsson
8135787e64 docs: add --checksum only supports sha256
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-11-26 07:48:00 +01:00
David Karlsson
1e400ddf88 docs: remove duplicate parser directives bullet list
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
Co-authored-by: t-dub <tom@t-dub.net>
2024-11-18 10:28:04 +01:00
Tõnis Tiigi
0655923d7e Merge pull request #3095 from eriksjolund/document_buildkit_volume_behaviour
docs(dockerfile): BuildKit does not discard Volume edits
2024-11-11 11:42:37 -08:00
David Karlsson
819d7bc1b1 docs: fix double parens in internal link
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-10-31 11:42:08 +01:00
CrazyMax
4622a2b2e8 Merge pull request #5472 from austinvazquez/touch-up-docs
docs: remove older warning format
2024-10-31 09:02:36 +01:00
Austin Vazquez
d04d0631ae docs: remove older warning format
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2024-10-30 18:22:39 -07:00
David Karlsson
5f27278ee3 docs: s/parent image/base image/
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-10-29 10:58:40 +01:00
Eoin Farrell
62b7206f3e Add labs reference for ADD --exclude
Also update examples to point syntax at 1-labs rather than 1.7-labs

Signed-off-by: Eoin Farrell <me@eoinfarrell.dev>
2024-10-23 12:56:52 +01:00
Eoin Farrell
3eb4892ad2 Add/fix references to labs dockerfile version
COPY options `--parents` and `--exclude` require dockerfile version `1.7-labs`.
Existing table of options only lists required version as `1.7`.
Code examples for `--exclude` does not include syntax line, like is included in
the code examples for `--parents`.

Signed-off-by: Eoin Farrell <me@eoinfarrell.dev>
2024-10-23 12:23:03 +01:00
Shaun Thompson
5379646fcf Update ARG, ENV and LABEL reference definitions to clarify that first KV-pairs are required but additional ones are optional
Signed-off-by: Shaun Thompson <shaun.thompson@docker.com>
2024-10-18 07:57:12 -04:00
Shaun Thompson
3a6e923ba6 update arg syntax ref
Signed-off-by: Shaun Thompson <shaun.thompson@docker.com>
2024-10-14 22:02:01 -04:00
Tonis Tiigi
885b1a5a61 docs: add note about check with errors
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-10-07 10:42:41 -07:00
Tõnis Tiigi
fdf5d37043 Merge pull request #5381 from dvdksn/clarify-arg-scope
docs: fix incorrect information about arg scoping
2024-10-03 11:24:59 -07:00
David Karlsson
fba1b10275 docs: fix incorrect information about arg scoping
ARGs are inherited by downstream build stages, if declared in a base
stage. The documentation ambiguously stated that ARGs are out of scope
in other stages, where it really meant other stages that are not
child/downstream stages.

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-10-03 11:02:03 +02:00
David Karlsson
016fa95b0a docs: remove from limitation for onbuild
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-10-02 13:32:41 +02:00
David Karlsson
065853268e docs: update "read more" link for dockerfile examples
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-10-01 08:43:25 +02:00
ryio1010
855e120adf frontend/dockerfile/docs: add $ in mount env example
Signed-off-by: ryio1010 <info@ryio1010.com>
2024-09-13 22:33:00 +09:00