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
|
|
|
|
2020-03-11 02:52:35 +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 \
|
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
|
|
|
# Add in Leenooks' apt repository
|
2020-11-22 23:39:17 +00:00
|
|
|
RUN curl -sL http://apt.leenooks.net/setup.sh | DISTRO=buster bash
|
2019-07-25 07:06:05 +00:00
|
|
|
|
|
|
|
# Add ZeroTier
|
2020-03-11 02:52:35 +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:29:53 +00:00
|
|
|
&& apt-get install -yqq zerotier-one \
|
2019-07-25 07:06:05 +00:00
|
|
|
&& apt-get -y autoremove \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
|
|
|
# Other Utilities
|
2020-03-11 02:52:35 +00:00
|
|
|
RUN echo "deb http://deb.debian.org/debian stretch main contrib" > /etc/apt/sources.list.d/contrib.list
|
2019-07-25 07:06:05 +00:00
|
|
|
RUN apt-get update \
|
2020-08-11 01:08:17 +00:00
|
|
|
&& apt-get install -yqq dosemu \
|
2021-01-15 06:42:03 +00:00
|
|
|
&& sed -ie 's#^lredir \(.*\)/media/cdrom#rem &#' /etc/dosemu/freedos/autoexec.bat \
|
2019-07-25 07:06:05 +00:00
|
|
|
&& apt-get -y autoremove \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
|
|
|
# Build SBBS
|
|
|
|
RUN apt-get update \
|
2020-09-09 14:25:25 +00:00
|
|
|
&& apt-get install -yqq git 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 \
|
2020-09-09 14:25:25 +00:00
|
|
|
&& wget https://gitlab.synchro.net/sbbs/sbbs/-/raw/master/install/GNUmakefile \
|
2020-08-11 01:08:17 +00:00
|
|
|
&& make RELEASE=1 USE_DOSEMU=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 \
|
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 {} + \
|
2020-09-09 14:25:25 +00:00
|
|
|
&& 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 \
|
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/*
|
|
|
|
|
2021-01-13 13:45:02 +00:00
|
|
|
# Add SSH
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -yqq openssh-server \
|
|
|
|
&& apt-get -y autoremove \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
|
|
|
# Add Doorparty
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -yqq golang git \
|
|
|
|
&& cd /tmp && git clone https://github.com/echicken/dpc2 \
|
|
|
|
&& cd dpc2 && echo -n 'ZGlmZiAtLWdpdCBhL2Rvb3JwYXJ0eS1jb25uZWN0b3IuZ28gYi9kb29ycGFydHktY29ubmVjdG9y\
|
|
|
|
LmdvCmluZGV4IDE4NzNhZTUuLjc3NmFhOGUgMTAwNjQ0Ci0tLSBhL2Rvb3JwYXJ0eS1jb25uZWN0\
|
|
|
|
b3IuZ28KKysrIGIvZG9vcnBhcnR5LWNvbm5lY3Rvci5nbwpAQCAtMTMyLDcgKzEzMiw3IEBAIGZ1\
|
|
|
|
bmMgaW5pdCgpIHsKIAogZnVuYyBtYWluKCkgewogCi0JY2ZnLCBlcnIgOj0gaW5pLkxvYWQoImRv\
|
|
|
|
b3JwYXJ0eS1jb25uZWN0b3IuaW5pIikKKwljZmcsIGVyciA6PSBpbmkuTG9hZCgiL29wdC9zYmJz\
|
|
|
|
L2N0cmwvZG9vcnBhcnR5LWNvbm5lY3Rvci5pbmkiKQogCWlmIGVyciAhPSBuaWwgewogCQlsb2cu\
|
|
|
|
RmF0YWxmKCJFcnJvciByZWFkaW5nIGRvb3JwYXJ0eS1jb25uZWN0b3IuaW5pOiAldiIsIGVycikK\
|
|
|
|
IAl9Cg=='|base64 -d |git apply \
|
|
|
|
&& go get gopkg.in/ini.v1 \
|
|
|
|
&& go get golang.org/x/crypto/ssh \
|
|
|
|
&& go build -i doorparty-connector.go \
|
|
|
|
&& echo -n 'LS0tIC9zcnYvZG9ja2VyL3NiYnMvbW9kcy9kb29ycGFydHkuanMJMjAyMS0wMS0xMyAyMjozNTox\
|
|
|
|
Ni4wNzQyNzk2MDggKzExMDAKKysrIC4vc3luY2hyb25ldC9kb29ycGFydHkuanMJMjAyMS0wMS0x\
|
|
|
|
MyAyMzoyMjoyMi44MzgwNjU4MzIgKzExMDAKQEAgLTMzLDcgKzMzLDcgQEAKICAgICAoY2ZnLnR1\
|
|
|
|
bm5lbF9ob3N0IHx8ICdsb2NhbGhvc3QnKSArICc6JyArIChjZmcudHVubmVsX3BvcnQgfHwgOTk5\
|
|
|
|
OSksCiAgICAgZ2V0X3Bhc3N3b3JkKCksIC8vIHBhc3N3b3JkCiAgICAgdXNlci5hbGlhcywKLSAg\
|
|
|
|
ICBhcmd2Lmxlbmd0aCA/IGFyZ3ZbMF0gOiB1bmRlZmluZWQKKyAgICBhcmd2Lmxlbmd0aCA/ICd4\
|
|
|
|
dHJuPScrYXJndlswXSA6IHVuZGVmaW5lZAogKTsKIAogY29uc29sZS5hdHRyaWJ1dGVzID0gYXR0\
|
|
|
|
cjsK'|base64 -d |git apply \
|
|
|
|
&& mv doorparty-connector synchronet/doorparty.js /opt/sbbs/exec \
|
|
|
|
&& mv doorparty-connector.ini /opt/sbbs/ctrl.orig \
|
|
|
|
&& apt-get -y purge golang git \
|
|
|
|
&& apt-get -y autoremove \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
2020-09-09 14:25:25 +00:00
|
|
|
# Add PHP
|
|
|
|
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-01-14 06:29:43 +00:00
|
|
|
COPY doorparty.sh ${SBBSEXEC}/
|
2020-11-23 02:32:22 +00:00
|
|
|
COPY main.cnf /opt/sbbs/ctrl.orig/
|
2021-01-13 13:45:02 +00:00
|
|
|
COPY sshd_config /opt/sbbs/ctrl.orig/
|
2020-06-21 04:01:30 +00:00
|
|
|
|
2019-08-14 10:56:48 +00:00
|
|
|
VOLUME [ "/var/lib/zerotier-one" ]
|
2021-01-13 13:45:02 +00:00
|
|
|
VOLUME [ "/opt/sbbs/data","/opt/sbbs/ctrl","/opt/sbbs/fido","/opt/sbbs/mods","/opt/sbbs/text" ]
|
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" ]
|