mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 17:26:28 +00:00
pkg: add acpid
Adds a new service for running `/sbin/acpid` that comes with busybox. The VM will shut down if the power button is pressed. Signed-off-by: Magnus Skjegstad <magnus@skjegstad.com>
This commit is contained in:
parent
7c063429f1
commit
ba8be57eef
22
pkg/acpid/Dockerfile
Normal file
22
pkg/acpid/Dockerfile
Normal file
@ -0,0 +1,22 @@
|
||||
FROM linuxkit/alpine:2e362f4459ba4491655061cccdd2fcc7a2de5eb3 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
|
||||
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
|
||||
|
||||
FROM linuxkit/alpine:2e362f4459ba4491655061cccdd2fcc7a2de5eb3 AS mirror2
|
||||
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
|
||||
RUN apk add --no-cache --initdb -p /out \
|
||||
busybox-initscripts
|
||||
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
|
||||
|
||||
FROM scratch
|
||||
COPY --from=mirror /out/ /
|
||||
COPY --from=mirror2 /out/etc/acpi /etc/acpi
|
||||
|
||||
CMD ["/sbin/acpid", "-f", "-d"]
|
||||
|
||||
LABEL org.mobyproject.config='{"binds": ["/dev:/dev"], "pid": "host"}'
|
||||
|
3
pkg/acpid/Makefile
Normal file
3
pkg/acpid/Makefile
Normal file
@ -0,0 +1,3 @@
|
||||
IMAGE=acpid
|
||||
|
||||
include ../package.mk
|
Loading…
Reference in New Issue
Block a user