mirror of
https://github.com/ggogel/seafile-containerized.git
synced 2025-09-02 02:39:26 +00:00
seafile-server alpine based multi-stage
This commit is contained in:
parent
aba2900172
commit
e5c2e81481
1 changed files with 36 additions and 28 deletions
|
@ -1,39 +1,47 @@
|
||||||
# See https://hub.docker.com/r/phusion/baseimage/tags/
|
FROM alpine:3.13 AS get
|
||||||
FROM phusion/baseimage:bionic-1.0.0
|
|
||||||
|
RUN apk add --no-cache wget
|
||||||
|
|
||||||
ENV SEAFILE_SERVER=seafile-server SEAFILE_VERSION=8.0.2
|
ENV SEAFILE_SERVER=seafile-server SEAFILE_VERSION=8.0.2
|
||||||
|
|
||||||
RUN export DEBIAN_FRONTEND=noninteractive
|
RUN cd /tmp && \
|
||||||
|
|
||||||
# Package installation
|
|
||||||
RUN apt-get update --fix-missing && apt-get install -y vim htop net-tools psmisc wget curl git socat \
|
|
||||||
tzdata \
|
|
||||||
nginx \
|
|
||||||
python3 python3-pip python3-setuptools \
|
|
||||||
libmysqlclient-dev \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
RUN mkdir -p /opt/seafile/ && cd /opt/seafile/ && \
|
|
||||||
wget https://download.seadrive.org/seafile-server_${SEAFILE_VERSION}_x86-64.tar.gz && \
|
wget https://download.seadrive.org/seafile-server_${SEAFILE_VERSION}_x86-64.tar.gz && \
|
||||||
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
|
||||||
|
|
||||||
# Python3
|
FROM alpine:3.9 as pip
|
||||||
RUN python3.6 -m pip install --upgrade pip \
|
|
||||||
&& pip3 install --timeout=3600 click termcolor colorlog pymysql \
|
|
||||||
Pillow pylibmc captcha jinja2 sqlalchemy django==1.11.29 django-pylibmc django-simple-captcha \
|
|
||||||
future mysqlclient \
|
|
||||||
&& rm -r /root/.cache/pip
|
|
||||||
|
|
||||||
# Scripts
|
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 \
|
||||||
|
socat \
|
||||||
|
tzdata \
|
||||||
|
python3 \
|
||||||
|
mariadb-dev \
|
||||||
|
procps \
|
||||||
|
psmisc
|
||||||
|
|
||||||
|
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
|
COPY scripts /scripts
|
||||||
RUN chmod u+x /scripts/*
|
RUN chmod u+x /scripts/*
|
||||||
|
WORKDIR?
|
||||||
# Seafile
|
|
||||||
WORKDIR /opt/seafile
|
|
||||||
|
|
||||||
# For using TLS connection to LDAP/AD server with docker-ce.
|
|
||||||
RUN find /opt/seafile/ \( -name "liblber-*" -o -name "libldap-*" -o -name "libldap_r*" -o -name "libsasl2.so*" \) -delete
|
|
||||||
|
|
||||||
EXPOSE 8080 8082 8001
|
EXPOSE 8080 8082 8001
|
||||||
|
|
||||||
CMD ["/sbin/my_init", "--", "/scripts/start.sh"]
|
CMD ["/scripts/start.sh"]
|
||||||
|
|
Loading…
Add table
Reference in a new issue