From 3d32d72163837638d9f92be8b49b13f933e12b19 Mon Sep 17 00:00:00 2001 From: Noelle Leigh Date: Thu, 5 Feb 2026 16:27:48 -0500 Subject: [PATCH 1/4] zbm-builder.sh: Use -d for custom container CLI This PR changes the `-d` argument of `zbm-builder.sh` to accept an executable argument, which will be used in place of `podman` or `docker`. The container-building docs have been updated to mention the ability to use a `docker`-compatible CLI. For example, to run the script using [nerdctl][0]: ```shell ./zbm-builder.sh -d nerdctl ``` The choice of container CLI follows this priority list: 1. `-d` argument 2. `PODMAN` variable in `zbm-builder.conf` 3. `podman` 4. `docker` Specifying the `PODMAN` variable with `env` isn't supported, because the value would be overwritten by the value from `zbm-builder.conf` when it gets sourced. [0]: https://github.com/containerd/nerdctl --- docs/general/container-building.rst | 4 ++-- zbm-builder.sh | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/general/container-building.rst b/docs/general/container-building.rst index 55fc1e1..545cad7 100644 --- a/docs/general/container-building.rst +++ b/docs/general/container-building.rst @@ -37,8 +37,8 @@ Dependencies ------------ To build ZFSBootMenu images from a build container, either `podman `_ or -`docker `_ is required. The development team prefers ``podman``, but ``docker`` may generally be -substituted without consequence. +`docker `_ is required. The development team prefers ``podman``, but ``docker`` (or other +compatible container CLI) may generally be substituted without consequence. If a custom build container is desired, `buildah `_ and ``podman`` are generally required. A :zbm:`Dockerfile ` is provided for convenience, but feature parity with the ``buildah`` diff --git a/zbm-builder.sh b/zbm-builder.sh index 467e327..89a0f26 100755 --- a/zbm-builder.sh +++ b/zbm-builder.sh @@ -38,7 +38,8 @@ OPTIONS: Specify the path to a configuration file that will be sourced (Default: \${BUILD_DIRECTORY}/zbm-builder.conf, if it exists) - -d Force use of docker instead of podman + -d + Force the use of a container CLI other than podman or docker -M Provide a comma-separated list of options to use for volume @@ -119,7 +120,7 @@ else PODMAN="docker" fi -CMDOPTS="b:dhi:l:L:c:M:O:HR" +CMDOPTS="b:d:hi:l:L:c:M:O:HR" # First pass to get build directory and configuration file while getopts "${CMDOPTS}" opt; do @@ -166,7 +167,7 @@ while getopts "${CMDOPTS}" opt; do b|c|h) ;; d) - PODMAN=docker + PODMAN="${OPTARG}" ;; i) BUILD_IMG="${OPTARG}" @@ -202,7 +203,7 @@ done shift $((OPTIND-1)) if ! command -v "${PODMAN}" >/dev/null 2>&1; then - echo "ERROR: this script requires podman or docker" + echo "ERROR: '${PODMAN}' not found. Pass -d to specify a different container CLI" exit 1 fi From 671f3ae4ad69ab5959a1d552814ce24b98603972 Mon Sep 17 00:00:00 2001 From: Noelle Leigh <5957867+noelleleigh@users.noreply.github.com> Date: Thu, 5 Feb 2026 21:02:41 -0500 Subject: [PATCH 2/4] docs: adjust wording in container-building.rst Co-authored-by: Andrew J. Hesford --- docs/general/container-building.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/general/container-building.rst b/docs/general/container-building.rst index 545cad7..003dd4b 100644 --- a/docs/general/container-building.rst +++ b/docs/general/container-building.rst @@ -37,8 +37,8 @@ Dependencies ------------ To build ZFSBootMenu images from a build container, either `podman `_ or -`docker `_ is required. The development team prefers ``podman``, but ``docker`` (or other -compatible container CLI) may generally be substituted without consequence. +`docker `_ is required. The development team prefers ``podman``, but ``docker`` or a +compatible container utility may generally be substituted without consequence. If a custom build container is desired, `buildah `_ and ``podman`` are generally required. A :zbm:`Dockerfile ` is provided for convenience, but feature parity with the ``buildah`` From 05e7bd24f77c9f84628d44bf0c2039974665d84f Mon Sep 17 00:00:00 2001 From: Noelle Leigh <5957867+noelleleigh@users.noreply.github.com> Date: Thu, 5 Feb 2026 21:03:21 -0500 Subject: [PATCH 3/4] zbm-builder.sh: Reword -d help text Co-authored-by: Andrew J. Hesford --- zbm-builder.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zbm-builder.sh b/zbm-builder.sh index 89a0f26..2c491e9 100755 --- a/zbm-builder.sh +++ b/zbm-builder.sh @@ -38,8 +38,9 @@ OPTIONS: Specify the path to a configuration file that will be sourced (Default: \${BUILD_DIRECTORY}/zbm-builder.conf, if it exists) - -d - Force the use of a container CLI other than podman or docker + -d + Use the specified front-end utility to launch the build container + (Default: podman if available, docker otherwise) -M Provide a comma-separated list of options to use for volume From 79c7e6e108baccaa537b9dfb0ac27b683ff05ae0 Mon Sep 17 00:00:00 2001 From: Noelle Leigh <5957867+noelleleigh@users.noreply.github.com> Date: Thu, 5 Feb 2026 21:03:54 -0500 Subject: [PATCH 4/4] zbm-builder.sh: Reword error when PODMAN can't be found Co-authored-by: Andrew J. Hesford --- zbm-builder.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zbm-builder.sh b/zbm-builder.sh index 2c491e9..adb2637 100755 --- a/zbm-builder.sh +++ b/zbm-builder.sh @@ -204,7 +204,7 @@ done shift $((OPTIND-1)) if ! command -v "${PODMAN}" >/dev/null 2>&1; then - echo "ERROR: '${PODMAN}' not found. Pass -d to specify a different container CLI" + echo "ERROR: ${PODMAN} not found; use '-d' to specify a container front-end" exit 1 fi