repo-cloner/old/Dockerfile

44 lines
1.1 KiB
Docker
Raw Normal View History

2021-01-20 12:55:06 +01:00
# Debian base image
FROM registry.sw3.cz/valicek1/lxcbian-bullseye
2018-02-06 11:53:29 +01:00
VOLUME /data
2021-01-20 12:55:06 +01:00
# 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
2021-01-20 12:55:06 +01:00
# 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/
2018-10-28 16:18:00 +01:00
# remove tty autospawn from inittab
2018-10-28 16:26:20 +01:00
# disable motd
RUN echo > /etc/motd
2018-10-28 16:52:59 +01:00
# install tail logger
RUN npm i frontail -g
2018-10-28 16:26:20 +01:00
2021-01-20 12:55:06 +01:00
# 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
2018-02-06 11:53:29 +01:00
CMD [ "/sbin/init" ]
2018-02-06 11:53:29 +01:00