74 lines
2.5 KiB
Docker
74 lines
2.5 KiB
Docker
# NAME leenooks/sbbs
|
|
# VERSION latest
|
|
|
|
FROM debian:buster-slim
|
|
|
|
# Base utilities
|
|
RUN apt-get update \
|
|
&& apt-get install -yqq curl supervisor procps less zip unzip arj unrar-free lhasa arc logrotate cron libnspr4 \
|
|
&& 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
|
|
|
|
# Add in Leenooks' apt repository
|
|
RUN curl -s https://apt.leenooks.net/buster/setup.sh | sh
|
|
|
|
# Add ZeroTier
|
|
RUN echo "deb [trusted=yes] http://download.zerotier.com/debian/buster buster main" > /etc/apt/sources.list.d/zerotier.list
|
|
|
|
# Leenooks Utils
|
|
RUN apt-get update \
|
|
&& apt-get install -yqq zerotier-one \
|
|
&& apt-get -y autoremove \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
# Build SBBS
|
|
RUN apt-get update \
|
|
&& apt-get install -yqq git build-essential libnspr4-dev libncurses5-dev libncursesw5-dev cvs wget pkgconf libcap2-bin sudo \
|
|
&& mkdir /opt/sbbs && cd /tmp \
|
|
&& wget https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/install/GNUmakefile \
|
|
&& make RELEASE=1 NO_X=1 SBBSDIR=/opt/sbbs install \
|
|
&& rm -rf /opt/sbbs/3rdp /opt/sbbs/src \
|
|
&& mv /opt/sbbs/ctrl /opt/sbbs/ctrl.orig \
|
|
&& mv /opt/sbbs/text /opt/sbbs/text.orig \
|
|
&& mkdir /opt/sbbs/nodes.orig && mv /opt/sbbs/node[1-5] /opt/sbbs/nodes.orig \
|
|
&& ln -sf nodes/node1 /opt/sbbs/ \
|
|
&& ln -sf nodes/node2 /opt/sbbs/ \
|
|
&& ln -sf nodes/node3 /opt/sbbs/ \
|
|
&& ln -sf nodes/node4 /opt/sbbs/ \
|
|
&& ln -sf nodes/node5 /opt/sbbs/ \
|
|
&& find /opt/sbbs -name CVS -type d -exec rm -rf {} + \
|
|
&& SUDO_FORCE_REMOVE=yes apt-get -y purge git build-essential libnspr4-dev libncurses5-dev libncursesw5-dev cvs wget pkgconf libcap2-bin sudo \
|
|
&& apt-get -y autoremove \
|
|
&& apt-get clean \
|
|
&& rm -rf /opt/sbbs/repo \
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
# Add PHP
|
|
RUN apt-get update \
|
|
&& apt-get install -yqq composer php-cgi php-fpm php-gd php-sqlite3 php-xml \
|
|
&& 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/
|
|
RUN chmod 644 /etc/logrotate.d/*
|
|
COPY supervisord.d /etc/supervisor/conf.d/
|
|
|
|
COPY init /sbin/init
|
|
ENTRYPOINT [ "/sbin/init" ]
|