397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
|
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
|
-
+
-
+
-
+
|
in “`ls -l`” output.
### 5.3 <a id="cengine"></a>Container Engine
Although the Fossil container build system defaults to Docker, we allow
for use of any OCI container system that implements the same interfaces.
We go into more details about this in [the next section](#light), but
We go into more details about this [below](#light), but
for now, it suffices to point out that you can switch to Podman while
using our `Makefile` convenience targets unchanged by saying:
```
$ make CENGINE=podman container-run
```
### 5.4 <a id="config"></a>Fossil Configuration Options
You can use this same mechanism to enable non-default Fossil
configuration options in your build. For instance, to turn on
the JSON API and the TH1 docs extension:
```
$ make container-image \
DBFLAGS='--build-arg FSLCFG="--json --with-th1-docs"'
```
If you also wanted [the Tcl evaluation extension](./th1.md#tclEval),
that brings us to [the next section](#run).
that brings us to [the next point](#run).
### 5.5 <a id="run"></a>Elaborating the Run Layer
If you want a basic shell environment for temporary debugging of the
running container, that’s easily added. Simply change this line in the
`Dockerfile`…
FROM scratch AS run
…to this:
FROM busybox AS run
Rebuild, redeploy, and your Fossil container will have a [BusyBox]-based
Rebuild and redeploy to give your Fossil container a [BusyBox]-based
shell environment that you can get into via:
$ docker exec -it -u fossil $(make container-version) sh
(That command assumes you built it via “`make container`” and are
therefore using its versioning scheme.)
|
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
|
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
|
-
-
+
+
|
[ctrd]: https://containerd.io/
[nerdctl]: https://github.com/containerd/nerdctl
[runc]: https://github.com/opencontainers/runc
### 6.2 <a id="podman"></a>Podman
A lighter-weight [rootless] [drop-in replacement][whatis] that doesn’t
give up the image builder is [Podman]. Initially created by
A lighter-weight [rootless][rl] [drop-in replacement][whatis] that
doesn’t give up the image builder is [Podman]. Initially created by
Red Hat and thus popular on that family of OSes, it will run on
any flavor of Linux. It can even be made to run [on macOS via Homebrew][pmmac]
or [on Windows via WSL2][pmwin].
On Ubuntu 22.04, the installation size is about 38 MiB, roughly a
tenth the size of Docker Engine.
|
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
|
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
|
-
-
-
-
-
+
+
+
+
+
|
--cap-drop SETFCAP \
--cap-drop SETPCAP \
--publish 127.0.0.1:9999:8080 \
localhost/fossil
$ podman start fossil
```
[pmmac]: https://podman.io/getting-started/installation.html#macos
[pmwin]: https://github.com/containers/podman/blob/main/docs/tutorials/podman-for-windows.md
[Podman]: https://podman.io/
[rootless]: https://github.com/containers/podman/blob/main/docs/tutorials/rootless_tutorial.md
[whatis]: https://podman.io/whatis.html
[pmmac]: https://podman.io/getting-started/installation.html#macos
[pmwin]: https://github.com/containers/podman/blob/main/docs/tutorials/podman-for-windows.md
[Podman]: https://podman.io/
[rl]: https://github.com/containers/podman/blob/main/docs/tutorials/rootless_tutorial.md
[whatis]: https://podman.io/whatis.html
### 6.3 <a id="nspawn"></a>`systemd-container`
If even the Podman stack is too big for you, the next-best option I’m
aware of is the `systemd-container` infrastructure on modern Linuxes,
available since version 239 or so. Its runtime tooling requires only
|