add seahub pip stage

This commit is contained in:
Gerrit Gogel 2021-01-22 22:11:34 +01:00
parent 883da811c8
commit b6d97edf4b

View file

@ -8,9 +8,7 @@ RUN cd /tmp && \
tar -zxvf 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 rm -f seafile-server_${SEAFILE_VERSION}_x86-64.tar.gz
FROM alpine:3.13 FROM alpine:3.9 AS pip
# TODO seperate pip stage
RUN apk add \ RUN apk add \
python3-dev \ python3-dev \
@ -28,8 +26,8 @@ tk-dev \
tcl-dev \ tcl-dev \
libmemcached-dev libmemcached-dev
RUN python3 -m pip install --upgrade pip \ RUN python3 -m pip install --upgrade pip &&\
&& pip3 install --timeout=3600 \ pip3 install --timeout=3600 \
Django==2.2.14 \ Django==2.2.14 \
future \ future \
captcha \ captcha \
@ -53,15 +51,29 @@ requests_oauthlib \
django-pylibmc \ django-pylibmc \
&& rm -r /root/.cache/pip && rm -r /root/.cache/pip
RUN apk add bash socat FROM alpine:3.9
RUN apk add \
bash \
socat \
python3 \
jpeg \
zlib \
freetype \
lcms2 \
openjpeg \
tiff \
tk \
mariadb-dev \
libmemcached
COPY --from=get /tmp/seafile-server*/seahub/ /opt/seafile/seafile-server-latest/seahub COPY --from=get /tmp/seafile-server*/seahub /opt/seafile/seafile-server-latest/seahub
COPY --from=get /tmp/seafile-server*/seafile/lib64/python3.6/site-packages /usr/lib/python3.6/site-packages COPY --from=get /tmp/seafile-server*/seafile/lib64/python3.6/site-packages /opt/seafile/seafile-server-latest/seafile/lib64/python3.6/site-packages
COPY --from=pip /usr/lib/python3.6/site-packages /usr/lib/python3.6/site-packages
COPY scripts /scripts COPY scripts /scripts
RUN chmod u+x /scripts/* RUN chmod u+x /scripts/*
ENV PYTHONPATH=/usr/lib/python3.6/site-packages:/opt/seafile/seafile-server-latest/seahub/thirdpart ENV PYTHONPATH=/usr/lib/python3.6/site-packages:/opt/seafile/seafile-server-latest/seahub/thirdpart:/opt/seafile/seafile-server-latest/seafile/lib64/python3.6/site-packages
ENV CCNET_CONF_DIR=/opt/seafile/conf/ccnet ENV CCNET_CONF_DIR=/opt/seafile/conf/ccnet
ENV SEAFILE_CONF_DIR=/opt/seafile/seafile-data ENV SEAFILE_CONF_DIR=/opt/seafile/seafile-data
ENV SEAFILE_CENTRAL_CONF_DIR=/opt/seafile/conf ENV SEAFILE_CENTRAL_CONF_DIR=/opt/seafile/conf