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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>