seafile-server ubuntu based multi-stage

This commit is contained in:
Gerrit Gogel 2021-01-23 13:26:43 +01:00
parent e5c2e81481
commit 8f942aca65

View file

@ -9,39 +9,28 @@ RUN cd /tmp && \
tar -zxvf seafile-server_${SEAFILE_VERSION}_x86-64.tar.gz && \
rm -f seafile-server_${SEAFILE_VERSION}_x86-64.tar.gz
FROM alpine:3.9 as pip
FROM ubuntu:bionic
RUN apk add --no-cache \
python3-dev \
py3-pip \
py3-setuptools
RUN python3 -m pip install --upgrade pip &&\
pip3 install --timeout=3600 \
click \
termcolor \
colorlog \
pymysql
FROM alpine:3.9
RUN apk add --no-cache \
bash \
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
socat \
tzdata \
psmisc \
net-tools \
libmariadb-dev \
python3 \
mariadb-dev \
procps \
psmisc
python3-click \
python3-termcolor \
python3-colorlog \
python3-pymysql \
&& rm -rf /var/lib/apt/lists/*
ENV SEAFILE_VERSION=8.0.2
ENV LD_LIBRARY_PATH=/lib:/usr/lib
COPY --from=get /tmp/seafile-server-${SEAFILE_VERSION} /opt/seafile/seafile-server-${SEAFILE_VERSION}
COPY --from=pip /usr/lib/python3.6/site-packages /usr/lib/python3.6/site-packages
COPY scripts /scripts
RUN chmod u+x /scripts/*
WORKDIR?
COPY --from=get /tmp/seafile-server-${SEAFILE_VERSION} /opt/seafile/seafile-server-${SEAFILE_VERSION}
EXPOSE 8080 8082 8001
CMD ["/scripts/start.sh"]