diff --git a/Dockerfile b/Dockerfile index 1640a0a..d1b3b41 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,8 +9,13 @@ RUN chown executor:executor /data RUN echo "* * * * * /usr/local/bin/cron-command" >> /etc/crontabs/root RUN apk del shadow ADD dockerbin/* checker/* src/* /usr/local/bin/ +ADD executor-conf /etc/init.d +RUN rc-update add executor-conf default # remove tty autospawn from inittab RUN sed 's/^tty.*$//g' -i /etc/inittab +# disable motd +RUN echo > /etc/motd + CMD [ "/sbin/init" ] diff --git a/dockerbin/launch-cron b/dockerbin/launch-cron deleted file mode 100755 index 04a8ebc..0000000 --- a/dockerbin/launch-cron +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -set -euo pipefail -IFS=$'\n\t' - -# make parallel citation shut up -mkdir -p ~executor/.parallel -touch ~executor/.parallel/will-cite - -# repair ownership -find /data \! -user executor -exec chown executor:executor {} \; - -# run cron -crond -f - diff --git a/executor-conf b/executor-conf new file mode 100644 index 0000000..67221c0 --- /dev/null +++ b/executor-conf @@ -0,0 +1,15 @@ +#!/sbin/openrc-run + +description="Sets executor initial evironment" + +start() { + # make parallel citation shut up + mkdir -p ~executor/.parallel + touch ~executor/.parallel/will-cite + # repair ownership + find /data \! -user executor -exec chown executor:executor {} \; + # pidfile + touch /var/run/checker.pid + chown executor:executor /var/run/checker.pid +} +