Skip to content

Commit 70bd008

Browse files
noelleleighahesford
authored andcommitted
zbm-builder.sh: Use -d for custom container CLI
1 parent e203eba commit 70bd008

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

docs/general/container-building.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ Dependencies
3737
------------
3838

3939
To build ZFSBootMenu images from a build container, either `podman <https://podman.io>`_ or
40-
`docker <https://www.docker.com>`_ is required. The development team prefers ``podman``, but ``docker`` may generally be
41-
substituted without consequence.
40+
`docker <https://www.docker.com>`_ is required. The development team prefers ``podman``, but ``docker`` or a
41+
compatible container utility may generally be substituted without consequence.
4242

4343
If a custom build container is desired, `buildah <https://buildah.io>`_ and ``podman`` are generally required. A
4444
:zbm:`Dockerfile <releng/docker/Dockerfile>` is provided for convenience, but feature parity with the ``buildah``

zbm-builder.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ OPTIONS:
3838
Specify the path to a configuration file that will be sourced
3939
(Default: \${BUILD_DIRECTORY}/zbm-builder.conf, if it exists)
4040
41-
-d Force use of docker instead of podman
41+
-d <container-frontend>
42+
Use the specified front-end utility to launch the build container
43+
(Default: podman if available, docker otherwise)
4244
4345
-M <argument>
4446
Provide a comma-separated list of options to use for volume
@@ -119,7 +121,7 @@ else
119121
PODMAN="docker"
120122
fi
121123

122-
CMDOPTS="b:dhi:l:L:c:M:O:HR"
124+
CMDOPTS="b:d:hi:l:L:c:M:O:HR"
123125

124126
# First pass to get build directory and configuration file
125127
while getopts "${CMDOPTS}" opt; do
@@ -166,7 +168,7 @@ while getopts "${CMDOPTS}" opt; do
166168
b|c|h)
167169
;;
168170
d)
169-
PODMAN=docker
171+
PODMAN="${OPTARG}"
170172
;;
171173
i)
172174
BUILD_IMG="${OPTARG}"
@@ -202,7 +204,7 @@ done
202204
shift $((OPTIND-1))
203205

204206
if ! command -v "${PODMAN}" >/dev/null 2>&1; then
205-
echo "ERROR: this script requires podman or docker"
207+
echo "ERROR: ${PODMAN} not found; use '-d' to specify a container front-end"
206208
exit 1
207209
fi
208210

0 commit comments

Comments
 (0)