2019-07-25 07:06:05 +00:00
|
|
|
# NAME leenooks/sbbs
|
2020-09-09 14:25:25 +00:00
|
|
|
# VERSION latest
|
2019-07-25 07:06:05 +00:00
|
|
|
|
2022-10-16 13:05:44 +00:00
|
|
|
FROM debian:bullseye-slim
|
2019-07-25 07:06:05 +00:00
|
|
|
|
|
|
|
# Base utilities
|
2023-05-29 02:35:50 +00:00
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -yqq curl supervisor procps less zip unzip arj unrar-free lhasa arc logrotate cron \
|
2019-07-25 07:06:05 +00:00
|
|
|
&& apt-get -y autoremove \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
2019-08-14 10:56:48 +00:00
|
|
|
# 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
|
|
|
# Other Utilities
|
2022-10-16 13:05:44 +00:00
|
|
|
#RUN echo "deb http://deb.debian.org/debian stretch main contrib" > /etc/apt/sources.list.d/contrib.list
|
|
|
|
#RUN apt-get update \
|
|
|
|
# && apt-get install -yqq dosemu \
|
|
|
|
# && sed -ie 's#^lredir \(.*\)/media/cdrom#rem &#' /etc/dosemu/freedos/autoexec.bat \
|
|
|
|
# && 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
|
2023-05-29 02:35:50 +00:00
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -yqq git build-essential autoconf2.13 libnspr4-dev libncurses5-dev libncursesw5-dev libarchive-dev wget python2.7 pkgconf libcap2-bin sudo libarchive13 libnspr4 \
|
2019-07-25 07:06:05 +00:00
|
|
|
&& mkdir /opt/sbbs && cd /tmp \
|
2020-09-09 14:25:25 +00:00
|
|
|
&& wget https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/install/GNUmakefile \
|
2022-05-28 03:07:54 +00:00
|
|
|
&& git clone https://gitlab.com/SynchronetBBS/sbbs.git /opt/sbbs/repo \
|
2023-05-16 23:39:44 +00:00
|
|
|
&& cd /tmp \
|
2022-10-16 13:05:44 +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 \
|
2019-08-14 10:56:48 +00:00
|
|
|
&& mv /opt/sbbs/text /opt/sbbs/text.orig \
|
2021-01-14 21:59:35 +00:00
|
|
|
&& mv /opt/sbbs/xtrn /opt/sbbs/xtrn.orig \
|
2023-05-29 01:18:19 +00:00
|
|
|
&& mv /opt/sbbs/web /opt/sbbs/web.orig \
|
2019-10-03 07:36:37 +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
|
|
|
&& find /opt/sbbs -name CVS -type d -exec rm -rf {} + \
|
2023-04-14 03:26:06 +00:00
|
|
|
&& SUDO_FORCE_REMOVE=yes apt-get -y purge git build-essential autoconf2.13 libnspr4-dev libncurses5-dev libarchive-dev libncursesw5-dev wget pkgconf libcap2-bin sudo \
|
2020-09-09 14:25:25 +00:00
|
|
|
&& apt-get -y autoremove \
|
|
|
|
&& apt-get clean \
|
2020-09-10 01:30:09 +00:00
|
|
|
&& rm -rf /opt/sbbs/repo \
|
2020-09-09 14:25:25 +00:00
|
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
|
|
|
# Add PHP
|
2023-05-29 02:35:50 +00:00
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -yqq composer php-cgi php-fpm php-gd 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/*
|
|
|
|
|
|
|
|
WORKDIR /opt/sbbs
|
|
|
|
ENV SBBSCTRL=/opt/sbbs/ctrl
|
|
|
|
ENV SBBSEXEC=/opt/sbbs/exec
|
|
|
|
ENV PATH=$PATH:${SBBSEXEC}
|
|
|
|
|
2020-06-21 04:01:30 +00:00
|
|
|
COPY start.sh ${SBBSEXEC}/
|
2021-03-16 09:59:44 +00:00
|
|
|
COPY doorparty.js ${SBBSEXEC}/
|
2020-11-23 02:32:22 +00:00
|
|
|
COPY main.cnf /opt/sbbs/ctrl.orig/
|
2020-06-21 04:01:30 +00:00
|
|
|
|
2023-05-29 01:18:19 +00:00
|
|
|
VOLUME [ "/opt/sbbs/data","/opt/sbbs/ctrl","/opt/sbbs/fido","/opt/sbbs/mods","/opt/sbbs/text","/opt/sbbs/web" ]
|
2019-08-14 10:56:48 +00:00
|
|
|
|
|
|
|
COPY logrotate.d /etc/logrotate.d/
|
2019-08-14 22:58:32 +00:00
|
|
|
RUN chmod 644 /etc/logrotate.d/*
|
2019-08-14 10:56:48 +00:00
|
|
|
COPY supervisord.d /etc/supervisor/conf.d/
|
|
|
|
|
2019-07-25 07:06:05 +00:00
|
|
|
COPY init /sbin/init
|
|
|
|
ENTRYPOINT [ "/sbin/init" ]
|
2023-01-22 00:43:58 +00:00
|
|
|
|
|
|
|
# Our ndoes are in ../nodes/node[0-9]
|
2023-05-24 10:19:48 +00:00
|
|
|
RUN sed -i -e 's#=../node\([0-9]\+\)/#=../nodes/node\1/#' /opt/sbbs/ctrl.orig/main.ini
|