repo-cloner/Dockerfile

44 lines
1.1 KiB
Docker

# Debian base image
FROM registry.sw3.cz/valicek1/lxcbian-bullseye
VOLUME /data
# install dependencies
RUN apt-get update
RUN apt-get full-upgrade -y --no-install-recommends
RUN apt-get install -y --no-install-recommends \
git bash openssh-server parallel vim cron npm nodejs logrotate
RUN apt-get clean
# create executor user
RUN useradd --uid 10000 -ms /bin/bash executor
# install crontab, enable cron
ADD crontab /etc/cron.d/repo-cloner-executor
RUN bash -c "dpkg -l | grep cron"
RUN systemctl enable ssh cron
ADD dockerbin/* checker/* src/* /usr/local/bin/
# remove tty autospawn from inittab
# disable motd
RUN echo > /etc/motd
# install tail logger
RUN npm i frontail -g
# enable frontail at startup
ADD startup-logcat /usr/local/bin
ADD logcat.service /etc/systemd/system
RUN systemctl enable logcat
# enable log dumping & rotation
ADD startup-logdump /usr/local/bin
ADD syslog.logrotate /etc/logrotate.d/syslog
ADD logdump.service /etc/systemd/system
RUN systemctl enable logdump
RUN ln -fs /usr/share/zoneinfo/Europe/Prague /etc/localtime
CMD [ "/sbin/init" ]