Fix permissions rc

This commit is contained in:
Václav Valíček 2018-10-28 16:26:20 +01:00
parent 8321d95788
commit 749f44dcd7
No known key found for this signature in database
GPG Key ID: 7CF44871CEA75938
3 changed files with 20 additions and 14 deletions

View File

@ -9,8 +9,13 @@ RUN chown executor:executor /data
RUN echo "* * * * * /usr/local/bin/cron-command" >> /etc/crontabs/root RUN echo "* * * * * /usr/local/bin/cron-command" >> /etc/crontabs/root
RUN apk del shadow RUN apk del shadow
ADD dockerbin/* checker/* src/* /usr/local/bin/ 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 # remove tty autospawn from inittab
RUN sed 's/^tty.*$//g' -i /etc/inittab RUN sed 's/^tty.*$//g' -i /etc/inittab
# disable motd
RUN echo > /etc/motd
CMD [ "/sbin/init" ] CMD [ "/sbin/init" ]

View File

@ -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

15
executor-conf Normal file
View File

@ -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
}