From 6e9306dee3278e46b46ff59fef6df88ab3987da3 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Tue, 8 Feb 2022 17:58:54 +0100 Subject: docker stuff --- MANUAL | 18 ++++++++++++++++++ Makefile | 7 +++++++ 2 files changed, 25 insertions(+) diff --git a/MANUAL b/MANUAL index 7f28f58..8a48baf 100644 --- a/MANUAL +++ b/MANUAL @@ -104,3 +104,21 @@ Rvnit is self-contained and can be booted directly as pid 1. It will mount /dev and /run when required, everything else is left to startup scripts. When receiving Ctrl-Alt-Delete, rvnit triggers an orderly reboot. + + Rvnit as init for a Docker container + +Fresh binary releases are provided in Alpine containers at +https://hub.docker.com/r/leahneukirchen/rvnit/tags + +rvnit is compiled statically, so you can copy it out if you have +different needs: + + COPY --from=docker.io/leahneukirchen/rvnit:latest /bin/rvnit /bin/ + CMD ["/bin/rvnit"] + +Note that /run must exist in the container if you want to use +the default control socket name. + +You can put the control socket onto a bind-mount and remote-control +rvnit using rvnitctl from the outside by pointing RVNIT_SOCK to the +appropriate target. diff --git a/Makefile b/Makefile index a45e672..47a87fc 100644 --- a/Makefile +++ b/Makefile @@ -7,4 +7,11 @@ all: $(ALL) clean: FRC rm -f $(ALL) +docker-release: FRC + TAG=$$(git rev-parse --short=8 @) ; \ + docker build -f Dockerfile.build -t docker.io/leahneukirchen/rvnit:$$TAG . && \ + docker tag docker.io/leahneukirchen/rvnit:$$TAG docker.io/leahneukirchen/rvnit:latest && \ + docker push docker.io/leahneukirchen/rvnit:$$TAG && \ + docker push docker.io/leahneukirchen/rvnit:latest + FRC: -- cgit 1.4.1