seafile-containerized/image/seafile_7.1/Dockerfile

60 lines
1.8 KiB
Docker
Raw Normal View History

2020-04-01 02:48:53 +00:00
# See https://hub.docker.com/r/phusion/baseimage/tags/
FROM phusion/baseimage:0.11
2020-07-15 06:31:33 +00:00
ENV SEAFILE_SERVER=seafile-server SEAFILE_VERSION=
2020-04-01 02:48:53 +00:00
RUN apt-get update --fix-missing
# Utility tools
2020-04-26 06:18:38 +00:00
RUN apt-get install -y vim htop net-tools psmisc wget curl git
2020-04-01 02:48:53 +00:00
# For suport set local time zone.
RUN export DEBIAN_FRONTEND=noninteractive && apt-get install tzdata -y
# Nginx
RUN apt-get install -y nginx
# Python3
2020-04-15 06:19:12 +00:00
RUN apt-get install -y python3 python3-pip python3-setuptools
2020-04-01 02:48:53 +00:00
RUN python3.6 -m pip install --upgrade pip && rm -r /root/.cache/pip
RUN pip3 install --timeout=3600 click termcolor colorlog pymysql \
2020-04-10 05:29:07 +00:00
django==1.11.29 && rm -r /root/.cache/pip
2020-04-01 02:48:53 +00:00
RUN pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 \
2020-04-15 06:19:12 +00:00
sqlalchemy django-pylibmc django-simple-captcha && \
2020-04-01 02:48:53 +00:00
rm -r /root/.cache/pip
# Scripts
2020-04-13 08:01:49 +00:00
COPY scripts_7.1 /scripts
2020-04-01 02:48:53 +00:00
COPY templates /templates
COPY services /services
2020-07-15 06:31:33 +00:00
RUN chmod u+x /scripts/*
2020-04-01 02:48:53 +00:00
RUN mkdir -p /etc/my_init.d && \
2020-04-10 05:29:07 +00:00
rm -f /etc/my_init.d/* && \
2020-04-01 02:48:53 +00:00
cp /scripts/create_data_links.sh /etc/my_init.d/01_create_data_links.sh
RUN 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
RUN mkdir -p /opt/seafile/ && cd /opt/seafile/ && \
wget https://download.seadrive.org/seafile-server_${SEAFILE_VERSION}_x86-64.tar.gz && \
2020-04-10 05:51:35 +00:00
tar -zxvf seafile-server_${SEAFILE_VERSION}_x86-64.tar.gz && \
rm -f seafile-server_${SEAFILE_VERSION}_x86-64.tar.gz
2020-04-01 02:48:53 +00:00
# For using TLS connection to LDAP/AD server with docker-ce.
RUN find /opt/seafile/ \( -name "liblber-*" -o -name "libldap-*" -o -name "libldap_r*" -o -name "libsasl2.so*" \) -delete
EXPOSE 80
CMD ["/sbin/my_init", "--", "/scripts/start.py"]