move poweroff to full-fledged package

Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
Avi Deitcher
2023-07-24 20:06:06 +03:00
parent 03c97c3584
commit 5a9755a433
3 changed files with 0 additions and 0 deletions

View File

@@ -1,12 +0,0 @@
FROM linuxkit/alpine:316c3f9d85c21fdd8bc7479e81d290f85bf60eb0 AS mirror
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --no-cache --initdb -p /out alpine-baselayout busybox musl
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
FROM scratch
CMD []
WORKDIR /
COPY --from=mirror /out/ /
COPY /poweroff.sh /poweroff.sh
ENTRYPOINT ["/bin/sh", "/poweroff.sh"]
LABEL org.mobyproject.config='{"pid": "host", "readonly": true, "capabilities": ["CAP_SYS_BOOT"]}'

View File

@@ -1 +0,0 @@
image: poweroff

View File

@@ -1,6 +0,0 @@
#!/bin/sh
TIMEOUT=${1:-30}
sleep "${TIMEOUT}"
/sbin/poweroff -f