@@ -15,8 +15,28 @@ the commands should work just as well by substituting `docker` for `podman`.
15
15
16
16
# Creating a ZFSBootMenu Builder Image
17
17
18
- The provided ` Dockerfile ` automates creation of the ZFSBootMenu builder image.
19
- From this directory, simply run
18
+ The script ` image-build.sh ` uses ` buildah ` to construct a ZBM builder image.
19
+ This is the preferred way to construct the image and may, in the future,
20
+ provide features not available with a ` podman build ` workflow. The script
21
+ requires a single argument, the tag to use when naming the image.
22
+
23
+ An optional second argument is a Git commit-like reference (a hash or tag) that
24
+ will be recorded as ` /etc/zbm-commit-hash ` in the image. The contents of this
25
+ file are used to checkout a specific state of the ZFSBootMenu repository. If
26
+ the tag is unspecified on the command line, the build script will attempt to
27
+ capture a reference to the current HEAD commit if the image is built in an
28
+ active git repository. If a commit-like name is not provided and cannot be
29
+ discovered, no default will be recorded and containers will attempt to build
30
+ from the current ` master ` .
31
+
32
+ The ` image-build.sh ` script expects to be run from the root of the ZFSBootMenu
33
+ tree by default. From there, the path ` releng/docker/zbm-build.sh ` defines the
34
+ entrypoint for build containers. To run the ` image-build.sh ` script from
35
+ another directory, simply set the ` ZBM_BUILDER ` environment variable to the
36
+ location of the ` zbm-build.sh ` script to use.
37
+
38
+ For those without access to ` buildah ` , the ` Dockerfile ` will also create of a
39
+ ZFSBootMenu builder image. From this directory, simply run
20
40
21
41
``` sh
22
42
podman build --squash -t zbm .
@@ -34,10 +54,10 @@ the latest release version packaged for Void; manually editing the `Dockerfile`
34
54
to add new dependencies may be necessary until a new release is packaged.
35
55
36
56
The builder image does ** not** contain a ZFSBootMenu installation or a copy of
37
- the upstream git repository. Instead, the image contains a build script,
38
- installed as ` /zbm-build.sh ` , that runs by default. The script ensures that a
39
- ZFSBootMenu repository is available in a running container and invokes
40
- ` generate-zbm ` to build images .
57
+ the upstream git repository. Instead, the entrypoint ` /zbm- build.sh ` will fetch
58
+ a ZFSBootMenu archive when the container is instantiated (or allow a local copy
59
+ to be bind-mounted) and, as noted above, attempt to check out a specific commit
60
+ based on the contents of ` /etc/zbm-commit-hash ` .
41
61
42
62
# Running a ZFSBootMenu Builder Container
43
63
0 commit comments