-
Notifications
You must be signed in to change notification settings - Fork 184
/
Dockerfile
68 lines (55 loc) · 2.46 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# See https://hub.docker.com/r/phusion/baseimage/tags/
FROM phusion/baseimage:focal-1.0.0-arm64
ENV SEAFILE_SERVER=seafile-pro-server SEAFILE_VERSION=
RUN apt-get update --fix-missing
# Utility tools
RUN apt-get install -y vim htop net-tools psmisc wget curl git unzip
# For suport set local time zone.
RUN export DEBIAN_FRONTEND=noninteractive && apt-get install -y tzdata \
nginx \
libmysqlclient-dev \
libmemcached11 libmemcached-dev \
libxmlsec1 xmlsec1 \
zlib1g-dev pwgen openssl poppler-utils \
fuse \
ldap-utils ca-certificates \
clamdscan iputils-ping \
ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy
# Java
RUN apt-get install -y openjdk-8-jre
# Libreoffice
RUN apt-get install -y libreoffice libreoffice-script-provider-python libsm-dev
# Python3
RUN apt-get install -y python3 python3-pip python3-setuptools python3-ldap python3-rados libffi-dev && \
rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python && \
python3 -m pip install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple && rm -r /root/.cache/pip
RUN pip3 install --timeout=3600 click termcolor colorlog pymysql django==3.2.* \
future mysqlclient Pillow pylibmc captcha markupsafe==2.0.1 jinja2 \
sqlalchemy django-pylibmc django-simple-captcha pyjwt pycryptodome==3.12.0 cffi==1.14.0 \
boto oss2 twilio python-ldap configparser psd-tools lxml \
-i https://mirrors.aliyun.com/pypi/simple && rm -r /root/.cache/pip
# Scripts
COPY scripts_9.0 /scripts
COPY templates /templates
COPY services /services
# acme
# RUN curl https://get.acme.sh | sh -s
RUN unzip /scripts/acme.sh-master.zip -d /scripts/ && \
mv /scripts/acme.sh-master /scripts/acme.sh && \
cd /scripts/acme.sh && /scripts/acme.sh/acme.sh --install
RUN echo "TLS_REQCERT allow" >> /etc/ldap/ldap.conf && \
echo "TCPSocket 3310" >> /etc/clamav/clamd.conf && \
echo "TCPAddr av" >> /etc/clamav/clamd.conf && \
chmod u+x /scripts/* && \
mkdir -p /etc/my_init.d && \
rm -f /etc/my_init.d/* && \
cp /scripts/create_data_links.sh /etc/my_init.d/01_create_data_links.sh && \
mkdir -p /etc/service/nginx && \
rm -f /etc/nginx/sites-enabled/* /etc/nginx/conf.d/* && \
mv /services/nginx.conf /etc/nginx/nginx.conf && \
mv /services/nginx.sh /etc/service/nginx/run
# Seafile
WORKDIR /opt/seafile
COPY seafile-pro-server-${SEAFILE_VERSION} /opt/seafile/seafile-pro-server-${SEAFILE_VERSION}
EXPOSE 80
CMD ["/sbin/my_init", "--", "/scripts/enterpoint.sh"]