sbbs/Dockerfile

67 lines
2.3 KiB
Docker
Raw Normal View History

2019-07-25 07:06:05 +00:00
# NAME leenooks/sbbs
2020-05-13 12:39:06 +00:00
# VERSION 3.18a
2019-07-25 07:06:05 +00:00
2020-05-13 12:39:06 +00:00
FROM debian:buster-slim
2019-07-25 07:06:05 +00:00
# Base utilities
RUN apt-get update \
2020-08-11 01:08:17 +00:00
&& apt-get install -yqq curl supervisor procps less zip unzip arj unrar-free lhasa arc logrotate cron libnspr4 \
php-cgi php-fpm php-sqlite3 php-xml \
2019-07-25 07:06:05 +00:00
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Set the default timezone for the container
RUN ln -sf /usr/share/zoneinfo/Australia/Melbourne /etc/localtime
2019-07-25 07:06:05 +00:00
# Add in Leenooks' apt repository
2020-05-13 12:39:06 +00:00
RUN curl -s http://apt.leenooks.net/buster/setup.sh | sh
2019-07-25 07:06:05 +00:00
# Add ZeroTier
2020-05-13 12:39:06 +00:00
RUN echo "deb [trusted=yes] http://download.zerotier.com/debian/buster buster main" > /etc/apt/sources.list.d/zerotier.list
2019-07-25 07:06:05 +00:00
# Leenooks Utils
RUN apt-get update \
2020-05-13 12:39:06 +00:00
&& apt-get install -yqq zerotier-one \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
2019-07-25 07:06:05 +00:00
# Build SBBS
RUN apt-get update \
2020-07-07 23:57:13 +00:00
&& apt-get install -yqq build-essential libnspr4-dev libncurses5-dev libncursesw5-dev cvs wget pkgconf libcap2-bin sudo \
2019-07-25 07:06:05 +00:00
&& mkdir /opt/sbbs && cd /tmp \
&& wget http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/install/GNUmakefile \
2020-08-11 01:08:17 +00:00
&& make RELEASE=1 NO_X=1 SBBSDIR=/opt/sbbs install \
2019-07-25 07:06:05 +00:00
&& rm -rf /opt/sbbs/3rdp /opt/sbbs/src \
&& mv /opt/sbbs/ctrl /opt/sbbs/ctrl.orig \
&& mv /opt/sbbs/text /opt/sbbs/text.orig \
2020-05-13 12:39:06 +00:00
&& mkdir /opt/sbbs/nodes.orig && mv /opt/sbbs/node[1-5] /opt/sbbs/nodes.orig \
2019-07-25 07:06:05 +00:00
&& ln -sf nodes/node1 /opt/sbbs/ \
&& ln -sf nodes/node2 /opt/sbbs/ \
&& ln -sf nodes/node3 /opt/sbbs/ \
&& ln -sf nodes/node4 /opt/sbbs/ \
2020-05-13 12:39:06 +00:00
&& ln -sf nodes/node5 /opt/sbbs/ \
2019-07-25 07:06:05 +00:00
&& find /opt/sbbs -name CVS -type d -exec rm -rf {} + \
2020-07-07 23:57:13 +00:00
&& SUDO_FORCE_REMOVE=yes apt-get -y purge build-essential libnspr4-dev libncurses5-dev libncursesw5-dev cvs wget pkgconf libcap2-bin sudo \
2019-07-25 07:06:05 +00:00
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
WORKDIR /opt/sbbs
ENV SBBSCTRL=/opt/sbbs/ctrl
ENV SBBSEXEC=/opt/sbbs/exec
ENV PATH=$PATH:${SBBSEXEC}
COPY start.sh ${SBBSEXEC}/
VOLUME [ "/var/lib/zerotier-one" ]
VOLUME [ "/opt/sbbs/data","/opt/sbbs/ctrl","/opt/sbbs/nodes","/opt/sbbs/fido","/opt/sbbs/text" ]
COPY logrotate.d /etc/logrotate.d/
2019-08-14 22:58:32 +00:00
RUN chmod 644 /etc/logrotate.d/*
COPY supervisord.d /etc/supervisor/conf.d/
2019-07-25 07:06:05 +00:00
COPY init /sbin/init
ENTRYPOINT [ "/sbin/init" ]