-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
38 lines (32 loc) · 1.37 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM centos:6
MAINTAINER holishing
RUN groupadd --gid 9999 bbs \
&& useradd -g bbs -s /bin/bash --uid 9999 bbs \
&& rm /etc/localtime \
&& ln -s /usr/share/zoneinfo/Asia/Taipei /etc/localtime
RUN rpm --import http://mirror.centos.org/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6 \
&& yum update -y \
&& yum clean all \
&& yum install -y \
gcc \
make \
patch \
glibc-devel \
glibc-devel.i686 \
libgcc.i686 \
libstdc++-devel.i686 \
ncurses-devel.i686
USER bbs
ENV HOME=/home/bbs
RUN cd /home/bbs \
&& sh -c "curl -L https://github.com/xeonchen/maplebbs-itoc/archive/5deda091832277d1997489d6572a5415aa7a242f.tar.gz|tar -zxv" \
&& mv maplebbs-itoc-5deda091832277d1997489d6572a5415aa7a242f maplebbs-itoc \
&& cp -r /home/bbs/maplebbs-itoc/bbs /home/
WORKDIR /home/bbs/patch
COPY file/patch-for64bit-Makefile /home/bbs/patch/patch-for64bit-Makefile
COPY file/config_h /home/bbs/src/include/config.h
RUN patch -p1 -d /home/bbs/src </home/bbs/patch/patch-for64bit-Makefile
RUN cd /home/bbs/src && make linux install clean
# Notice, in here, mbbsd started service and PROVIDE BIG5 encoding for users.
CMD ["sh","-c","/home/bbs/bin/account && /home/bbs/bin/camera && /home/bbs/bin/bbsd 8888 && while true; do sleep 10; done"]
EXPOSE 8888