Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions content/en/docs/plugins/resource/dockerfile.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ Matches https://docs.docker.com/engine/reference/builder/#arg[Dockerfile ARG, wi

* When used as a target, *only* the value of the argument (right of the `=` when present)
** When no argument value is found (e.g. default value, no character `=` or empty value),
then updatecli appends the `=` character followed by the value.
then updatecli appends the `=` character followed by the value. It is possible to disable this behaviour by providing `ignoreDefaultValue: true` in the configuration.
Copy link
Member

@lemeurherve lemeurherve Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: WDYT of ignoreNoArgValue, or (englobing ENV) ignoreUnspecifiedValue?

I find "default" a bit confusing and less immediate to understand. (personal opinion)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I named the argument based on the existing documentation, which is IMO a bit confusing, since the official docker doc refers to "default" value as the literal value that may be specified. But we could also adjust the documentation to be more aligned with https://docs.docker.com/reference/dockerfile/#default-values.

Maybe ignoreMissingValue would make sense (I don't really like unspecified, too long).

Copy link
Member

@lemeurherve lemeurherve Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "Missing" is a bit misleading as it's generally a choice of not specifying any value, not something missing (forgotten) per se.

To go along with the official docker doc, WDYT of ignoreNoDefaultValue or ignoreNoDefault (shorter)?


With the following definition:

Expand Down Expand Up @@ -243,6 +243,34 @@ ARG RUST_VERSION=UPDATECLI_VERSION
ARG updatecli_version
----

Using `ignoreDefaultValue: true`, with the following definition:

[source, yaml]
----
spec:
file: Dockerfile
instruction:
keyword: "ARG"
matcher: "UPDATECLI_VERSION"
ignoreDefaultValue: true
----

you get the following results:

[source, Dockerfile]
----
# Matches
ARG UPDATECLI_VERSION=0.1.0
arg UPDATECLI_VERSION=0.1.0

## Does NOT matches
ARG UPDATECLI_VERSION
ARG UPDATECLI_VERSION=
ARG GOLANG_VERSION
ARG RUST_VERSION=UPDATECLI_VERSION
ARG updatecli_version
----

==== ENV

Matches https://docs.docker.com/engine/reference/builder/#env[Dockerfile ENV, window="_blank"] instruction by keys to manipulate their values.
Expand All @@ -257,7 +285,7 @@ Matches https://docs.docker.com/engine/reference/builder/#env[Dockerfile ENV, wi

* When used as a target, *only* the value of the environment (right of the `=` when present)
** When no environment value is found (e.g. default value, no character `=` or empty value),
then updatecli appends the `=` character followed by the value.
then updatecli appends the `=` character followed by the value. It is possible to disable this behaviour by providing `ignoreDefaultValue: true` in the configuration.

With the following definition:

Expand Down