43 lines
1.2 KiB
Docker
43 lines
1.2 KiB
Docker
FROM frolvlad/alpine-glibc
|
|
|
|
VOLUME /opt/seafile
|
|
|
|
EXPOSE 80 10001 12001 8000 8080 8082
|
|
|
|
ENV SEAF=/opt/seafile
|
|
|
|
ENV INSTALLPATH=$SEAF/seafile-server-latest
|
|
|
|
ENV CCNET_CONF_DIR=$SEAF/ccnet
|
|
|
|
ENV SEAFILE_CONF_DIR=$SEAF/seafile-data
|
|
|
|
ENV SEAFILE_CENTRAL_CONF_DIR=$SEAF/conf
|
|
|
|
ENV PYTHONPATH=/usr/lib/python2.7/site-packages
|
|
|
|
COPY requirements.txt /tmp/requirements.txt
|
|
|
|
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories \
|
|
&& apk --no-cache add py-pip sqlite-dev py-mysqldb py-imaging py-pillow py-setuptools sqlite zlib curl bash openssl-dev libevent libselinux nginx \
|
|
&& pip install -r /tmp/requirements.txt && apk --no-cache del py-pip \
|
|
&& rm -f /tmp/requirements.txt \
|
|
&& mkdir -p /run/nginx
|
|
|
|
COPY conf /opt/seafile/conf
|
|
COPY conf /etc/seafile
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
|
COPY scripts/upgrade.py /usr/local/sbin/upgrade
|
|
COPY scripts/seafile-server.sh /sbin/seafile-server
|
|
|
|
RUN ulimit -n 30000 && mkdir -p $SEAF/pids && \
|
|
chmod +x /usr/local/sbin/upgrade /sbin/seafile-server
|
|
|
|
ENV SEAF_UPGRADE_INTERVAL=3
|
|
|
|
WORKDIR $SEAF
|
|
|
|
ENTRYPOINT ["/sbin/seafile-server"]
|
|
#Defaults to run-upgrade options include: run, run-upgrade, upgrade, stop, stop-upgrade
|
|
CMD ["run-upgrade"]
|