Upgrade to debian-based rootfs
This commit is contained in:
36
Dockerfile
36
Dockerfile
@@ -1,23 +1,41 @@
|
||||
# Alpine base image
|
||||
FROM registry.sw3.cz/valicek1/lxc-alpine
|
||||
# Debian base image
|
||||
FROM registry.sw3.cz/valicek1/lxcbian-bullseye
|
||||
|
||||
VOLUME /data
|
||||
|
||||
RUN apk add --no-cache git bash openssh parallel openssh-keygen vim shadow
|
||||
# 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
|
||||
ADD crontab /etc/crontabs/executor
|
||||
RUN apk del shadow
|
||||
|
||||
# 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/
|
||||
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
|
||||
# install tail logger
|
||||
RUN apk add npm
|
||||
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" ]
|
||||
|
||||
Reference in New Issue
Block a user