mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-30 20:43:02 +02:00
Containers in Infix are read-only, any persistent data is either stored in volumes or content mounts. To prevent lingering containers, as have been seen on some test systems, we move cleanup stage from confd to use the Finit cleanup:script mechanism. The resulting code is simpler, shorter, and easier to debug and use. As an added benefit, confd no longer prunes "unused" volumes by itself on (any!) reconfiguration event, which with the new container life cycle in Infix was quite fragile. Instead the CLI command 'container prune' is extended with 'podman volume prune', which coincidentally the help text already alluded to. This patch requires Finit v4.10-rc1, or later. Fixes #902 Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
8 lines
444 B
Plaintext
8 lines
444 B
Plaintext
# Start a container instance (%i) and redirect logs to /log/container
|
|
# Give podman enough time to properly shut down the container. Every
|
|
# time we start a container we run the setup stage, disable the Finit
|
|
# timeout to allow the setup stage to run to completion.
|
|
sysv log:prio:local1,tag:%i kill:10 pid:!/run/container:%i.pid \
|
|
pre:0,/usr/sbin/container cleanup:0,/usr/sbin/container \
|
|
[2345] <!> :%i container -n %i -- container %i
|