sig-cloud-instance-images/Containerfile-init
Lukas Magauer a43b9a4233
Build micro and init variants of the container images (#42)
* Add ubi-init and micro images

* Add CI
2023-04-07 09:50:11 -04:00

19 lines
1,022 B
Text

ARG ImageVersion
FROM rockylinux/rockylinux:$ImageVersion-ubi
LABEL summary="Rocky Linux UBI init image" \
description="This image is designed to run an init system as PID 1 for running multi-services inside a container." \
usage="Do not use directly. Use as a base image for daemons. Install chosen packages and 'systemctl enable' them." \
maintainer="Magauer Lukas <lukas@magauer.eu>"
CMD ["/sbin/init"]
STOPSIGNAL SIGRTMIN+3
#TODO: this is a workaround until the ubi image has systemd in it again
RUN dnf -y install systemd
#mask systemd-machine-id-commit.service - partial fix for https://bugzilla.redhat.com/show_bug.cgi?id=1472439
RUN systemctl mask systemd-remount-fs.service dev-hugepages.mount sys-fs-fuse-connections.mount systemd-logind.service getty.target console-getty.service systemd-udev-trigger.service systemd-udevd.service systemd-random-seed.service systemd-machine-id-commit.service
RUN dnf -y install procps-ng && dnf clean all; rm -rf /var/cache /var/log/dnf* /var/log/yum.*