2024-07-28 19:51:27 +00:00
FROM ubuntu:jammy@sha256:340d9b015b194dc6e2a13938944e0d016e57b9679963fdeb9ce021daac430221 AS build
RUN apt-get update && \
DEBIAN_FRONTEND = noninteractive apt-get install -y \
wget
2021-01-21 01:33:21 +00:00
2024-07-28 19:51:27 +00:00
ENV SEAFILE_VERSION = 11 .0.9
2021-01-21 01:33:21 +00:00
2024-07-28 19:51:27 +00:00
WORKDIR /tmp
RUN wget https://raw.githubusercontent.com/haiwen/seafile-docker/master/build/seafile-build.sh
RUN wget https://raw.githubusercontent.com/haiwen/seafile-docker/master/build/seafile-build.py
RUN chmod +x ./seafile-build.sh
RUN ./seafile-build.sh ${ SEAFILE_VERSION }
2021-01-21 01:33:21 +00:00
2021-02-01 23:32:51 +00:00
RUN sed -i "s@.*INNER_FILE_SERVER_ROOT.*@INNER_FILE_SERVER_ROOT = os.environ.get('INNER_FILE_SERVER_ROOT')@" /tmp/seafile-server-${ SEAFILE_VERSION } /seahub/seahub/settings.py
2021-02-03 22:18:20 +00:00
RUN sed -i '/warning_if_seafile_not_running;/d' /tmp/seafile-server-${ SEAFILE_VERSION } /seahub.sh
2024-07-28 20:43:50 +00:00
FROM alpine:3.20.2 AS clean
ENV SEAFILE_VERSION = 11 .0.9
COPY --from= build /tmp/seafile-server-${ SEAFILE_VERSION } /tmp/seafile-server-${ SEAFILE_VERSION }
RUN rm -rf /tmp/seafile-server-${ SEAFILE_VERSION } /seahub/thirdpart
2024-07-28 10:21:23 +00:00
FROM python:3.10.14-alpine3.20 AS pip
2021-01-21 01:33:21 +00:00
2021-01-23 11:12:31 +00:00
RUN apk add --no-cache \
2021-01-21 01:33:21 +00:00
mariadb-dev \
build-base \
jpeg-dev \
zlib-dev \
freetype-dev \
lcms2-dev \
openjpeg-dev \
tiff-dev \
tk-dev \
2021-01-22 17:57:45 +00:00
tcl-dev \
2023-10-18 15:51:29 +00:00
libmemcached-dev \
openldap-dev \
python3-dev
2021-01-21 01:33:21 +00:00
2021-01-22 21:11:34 +00:00
RUN python3 -m pip install --upgrade pip && \
2023-10-18 18:39:23 +00:00
pip3 install --target /pip-deps --timeout= 3600 --no-cache-dir \
2024-02-21 13:57:36 +00:00
future = = 1.0.0 \
2024-07-01 10:59:25 +00:00
pillow = = 10.4.0 \
2024-07-27 10:06:20 +00:00
captcha = = 0.6.0 \
2024-02-19 10:01:31 +00:00
pyjwt = = 2.8.0 \
2024-02-19 10:04:06 +00:00
mysqlclient = = 2.2.4 \
2024-07-09 16:04:07 +00:00
django = = 4.2.14 \
2024-02-19 09:44:22 +00:00
django-pylibmc= = 0.6.1 \
2024-02-19 10:42:15 +00:00
django-simple-captcha= = 0.6.0 \
2024-02-19 10:01:27 +00:00
pycryptodome = = 3.20.0 \
2024-05-06 15:50:08 +00:00
djangosaml2 = = 1.9.3 \
2024-02-19 09:44:22 +00:00
python-ldap= = 3.4.4 \
2024-07-28 20:43:50 +00:00
sqlalchemy = = 2.0.31 \
2024-07-28 20:49:41 +00:00
sqlalchemy = = 2.0.31 \
django-statici18n= = 2.5.0 \
django_webpack_loader = = 3.1.0 \
2024-07-28 20:43:50 +00:00
django_picklefield = = 3.1 \
django_formtools = = 2.4 \
2024-07-28 20:49:41 +00:00
djangorestframework = = 3.15.2 \
python-dateutil= = 2.9.0 \
python-cas= = 1.6.0 \
requests = = 2.32.3 \
requests_oauthlib = = 2.0.0 \
qrcode = = 7.4.2 \
chardet = = 5.2.0 \
openpyxl = = 3.1.5 \
Markdown = = 3.6 \
bleach = = 6.1.0 \
pypinyin = = 0.51.0 \
PyMuPDF = = 1.24.9 \
2024-07-28 20:43:50 +00:00
pymysql = = 1.1.1
2023-10-18 18:39:23 +00:00
RUN find /pip-deps -name "__pycache__" -type d -exec rm -r { } + && \
rm -rf /pip-deps/pip /pip-deps/wheel /pip-deps/setuptools
2021-01-21 01:33:21 +00:00
2024-07-28 10:21:23 +00:00
FROM python:3.10.14-alpine3.20
2021-01-21 02:40:42 +00:00
2021-01-23 11:12:31 +00:00
RUN apk add --no-cache \
2021-01-22 21:11:34 +00:00
bash \
socat \
jpeg \
zlib \
freetype \
lcms2 \
openjpeg \
tiff \
tk \
mariadb-dev \
2021-01-31 13:49:48 +00:00
libmemcached \
2021-11-11 20:44:52 +00:00
netcat-openbsd \
2023-10-18 15:51:29 +00:00
gcompat \
openldap
2021-01-21 02:40:42 +00:00
2023-10-18 18:39:23 +00:00
COPY --from= pip /pip-deps /usr/local/lib/python3.10/site-packages
2024-07-28 20:43:50 +00:00
COPY --from= clean /tmp/seafile-server*/seahub /opt/seafile/seafile-server-latest/seahub
COPY --from= clean /tmp/seafile-server*/runtime /opt/seafile/seafile-server-latest/runtime
COPY --from= clean /tmp/seafile-server*/seahub.sh /opt/seafile/seafile-server-latest/seahub.sh
COPY --from= clean /tmp/seafile-server*/check_init_admin.py /opt/seafile/seafile-server-latest/check_init_admin.py
COPY --from= clean /tmp/seafile-server*/seafile/lib/python3/site-packages /opt/seafile/seafile-server-latest/seafile/lib/python3/site-packages
COPY --from= clean /tmp/seafile-server*/pro/python/seafevents /opt/seafile/seafile-server-latest/pro/python/seafevents
COPY --from= build /tmp/seafile-server*/seahub/thirdpart/bin /opt/seafile/seafile-server-latest/seahub/thirdpart/bin
COPY --from= build /tmp/seafile-server*/seahub/thirdpart/gunicorn /opt/seafile/seafile-server-latest/seahub/thirdpart/gunicorn
COPY --from= build /tmp/seafile-server*/seahub/thirdpart/registration /opt/seafile/seafile-server-latest/seahub/thirdpart/registration
COPY --from= build /tmp/seafile-server*/seahub/thirdpart/constance /opt/seafile/seafile-server-latest/seahub/thirdpart/constance
COPY --from= build /tmp/seafile-server*/seahub/thirdpart/termsandconditions /opt/seafile/seafile-server-latest/seahub/thirdpart/termsandconditions
COPY --from= build /tmp/seafile-server*/seahub/thirdpart/seafobj /opt/seafile/seafile-server-latest/seahub/thirdpart/seafobj
2023-10-18 15:52:31 +00:00
2021-01-21 13:50:39 +00:00
COPY scripts /scripts
RUN chmod u+x /scripts/*
2023-10-18 18:39:23 +00:00
2021-02-03 22:14:17 +00:00
RUN mkdir -p /opt/seafile/logs && \
touch /opt/seafile/logs/seahub.log && \
mkdir -p /opt/seafile/pids
2021-01-21 01:33:21 +00:00
2023-10-18 15:52:31 +00:00
ENV PYTHONPATH = /usr/local/lib/python3.10/site-packages:/opt/seafile/seafile-server-latest/seahub/thirdpart:/opt/seafile/seafile-server-latest/seafile/lib/python3/site-packages:/opt/seafile/seafile-server-latest/seahub:/opt/seafile/seafile-server-latest/pro/python
2021-01-22 18:13:37 +00:00
ENV CCNET_CONF_DIR = /opt/seafile/conf/ccnet
ENV SEAFILE_CONF_DIR = /opt/seafile/seafile-data
ENV SEAFILE_CENTRAL_CONF_DIR = /opt/seafile/conf
ENV SEAFILE_RPC_PIPE_PATH = /opt/seafile/seafile-server-latest/runtime
2021-02-01 23:32:51 +00:00
ENV INNER_FILE_SERVER_ROOT = http://seafile-server:8082
2021-02-01 23:32:06 +00:00
ENV SEAHUB_LOG_DIR = /opt/seafile/logs
2021-01-27 23:39:04 +00:00
ENV SEAFILE_ADMIN_EMAIL = me@example.com
ENV SEAFILE_ADMIN_PASSWORD = asecret
2023-10-23 18:00:57 +00:00
ENV SEAFILE_SERVER_HOSTNAME = seafile-server
2021-02-03 22:13:20 +00:00
ENV PYTHON = python3
2023-10-18 15:52:51 +00:00
ENV SEAHUB_DIR = /opt/seafile/seafile-server-latest/seahub
2021-01-24 15:02:37 +00:00
2021-01-21 01:33:21 +00:00
EXPOSE 8000
2024-07-28 20:43:50 +00:00
CMD [ "/scripts/start.sh" ]