2022-08-09 17:53:53 +00:00
FROM alpine:3.13.12 AS get
2022-06-23 11:19:54 +00:00
ENV SEAFILE_SERVER = seafile-server SEAFILE_VERSION = 9.0.6
2021-01-21 01:33:21 +00:00
RUN apk add --no-cache wget
RUN cd /tmp && \
wget https://download.seadrive.org/seafile-server_${ SEAFILE_VERSION } _x86-64.tar.gz && \
tar -zxvf seafile-server_${ SEAFILE_VERSION } _x86-64.tar.gz && \
rm -f seafile-server_${ SEAFILE_VERSION } _x86-64.tar.gz
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
2022-08-09 17:53:53 +00:00
FROM alpine:3.13.12 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
python3-dev \
py3-pip \
py3-setuptools \
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 \
libmemcached-dev
2021-01-21 01:33:21 +00:00
2021-01-22 21:11:34 +00:00
RUN python3 -m pip install --upgrade pip && \
pip3 install --timeout= 3600 \
2021-01-21 01:33:21 +00:00
future \
pillow \
2021-02-01 23:33:24 +00:00
captcha \
2021-01-21 01:33:21 +00:00
pyjwt \
2021-02-01 23:52:31 +00:00
mysqlclient \
2021-11-11 14:19:17 +00:00
django = = 3.2.9 \
2021-01-22 17:57:45 +00:00
django-pylibmc \
2021-02-01 23:33:24 +00:00
django-simple-captcha \
2021-12-10 12:09:48 +00:00
pycryptodome = = 3.12.0 \
2021-01-21 01:33:21 +00:00
&& rm -r /root/.cache/pip
2022-08-09 17:53:53 +00:00
FROM alpine:3.13.12
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 \
python3 \
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 \
gcompat
2021-01-21 02:40:42 +00:00
2021-01-22 21:11:34 +00:00
COPY --from= get /tmp/seafile-server*/seahub /opt/seafile/seafile-server-latest/seahub
2021-01-26 14:18:07 +00:00
COPY --from= get /tmp/seafile-server*/runtime /opt/seafile/seafile-server-latest/runtime
2021-01-27 23:39:04 +00:00
COPY --from= get /tmp/seafile-server*/seahub.sh /opt/seafile/seafile-server-latest/seahub.sh
COPY --from= get /tmp/seafile-server*/check_init_admin.py /opt/seafile/seafile-server-latest/check_init_admin.py
2021-11-11 20:44:31 +00:00
COPY --from= get /tmp/seafile-server*/seafile/lib/python3/site-packages /opt/seafile/seafile-server-latest/seafile/lib/python3/site-packages
2021-01-30 13:24:28 +00:00
COPY --from= pip /usr/lib/python3.8/site-packages /usr/lib/python3.8/site-packages
2021-01-21 13:50:39 +00:00
COPY scripts /scripts
2021-02-03 22:14:17 +00:00
2021-01-21 13:50:39 +00:00
RUN chmod u+x /scripts/*
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
2021-11-11 16:54:30 +00:00
ENV PYTHONPATH = /usr/lib/python3.8/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
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
2021-02-03 22:13:20 +00:00
ENV PYTHON = python3
2021-01-24 15:02:37 +00:00
2021-01-21 01:33:21 +00:00
EXPOSE 8000
2021-01-21 13:50:39 +00:00
CMD [ "/scripts/start.sh" ]