This commit is contained in:
11
Containerfile
Normal file
11
Containerfile
Normal file
@@ -0,0 +1,11 @@
|
||||
FROM registry.fedoraproject.org/fedora-minimal:39
|
||||
|
||||
RUN --mount=type=cache,target=/var/cache \
|
||||
microdnf install -y \
|
||||
--setopt install_weak_deps=0 \
|
||||
nut \
|
||||
&& :
|
||||
|
||||
COPY start.sh /
|
||||
|
||||
CMD ["/start.sh"]
|
||||
1
Jenkinsfile
vendored
Normal file
1
Jenkinsfile
vendored
Normal file
@@ -0,0 +1 @@
|
||||
buildContainerImage2(archlist: ['amd64', 'arm64'])
|
||||
16
start.sh
Executable file
16
start.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
install -o root -g nut -m ug=rwx,o= -d /run/nut
|
||||
|
||||
# To automatically update the host's udev rules for NUT devices,
|
||||
# bind-mount /etc/udev/rules.d into the container. Then, create a
|
||||
# systemd.path(5) unit to monitor that directory and a
|
||||
# systemd.service(5) unit to run `udevadm control --reload` and
|
||||
# `udevadm trigger` when changes are detected.
|
||||
if mountpoint -q /etc/udev/rules.d; then
|
||||
cp -uv /lib/udev/rules.d/*-nut-*.rules /etc/udev/rules.d/
|
||||
sleep 1
|
||||
fi
|
||||
|
||||
upsdrvctl start
|
||||
exec upsd -FF
|
||||
Reference in New Issue
Block a user