Merge branch 'server-ubuntu'

This commit is contained in:
Gerrit Gogel 2021-01-23 13:39:29 +01:00
commit 059d7400cd
10 changed files with 38 additions and 41 deletions

36
seafile-server/Dockerfile Normal file
View file

@ -0,0 +1,36 @@
FROM alpine:3.13 AS get
RUN apk add --no-cache wget
ENV SEAFILE_SERVER=seafile-server SEAFILE_VERSION=8.0.2
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
FROM ubuntu:bionic
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
socat \
tzdata \
psmisc \
net-tools \
libmariadb-dev \
python3 \
python3-click \
python3-termcolor \
python3-colorlog \
python3-pymysql \
&& rm -rf /var/lib/apt/lists/*
ENV SEAFILE_VERSION=8.0.2
COPY scripts /scripts
RUN chmod u+x /scripts/*
COPY --from=get /tmp/seafile-server-${SEAFILE_VERSION} /opt/seafile/seafile-server-${SEAFILE_VERSION}
EXPOSE 8080 8082 8001
CMD ["/scripts/start.sh"]

View file

@ -1,39 +0,0 @@
# See https://hub.docker.com/r/phusion/baseimage/tags/
FROM phusion/baseimage:bionic-1.0.0
ENV SEAFILE_SERVER=seafile-server SEAFILE_VERSION=8.0.2
RUN export DEBIAN_FRONTEND=noninteractive
# 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 && \
tar -zxvf seafile-server_${SEAFILE_VERSION}_x86-64.tar.gz && \
rm -f seafile-server_${SEAFILE_VERSION}_x86-64.tar.gz
# Python3
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
COPY scripts /scripts
RUN chmod u+x /scripts/*
# 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
CMD ["/sbin/my_init", "--", "/scripts/start.sh"]

View file

@ -10,7 +10,7 @@ RUN cd /tmp && \
FROM alpine:3.9 AS pip FROM alpine:3.9 AS pip
RUN apk add \ RUN apk add --no-cache \
python3-dev \ python3-dev \
py3-pip \ py3-pip \
py3-setuptools \ py3-setuptools \
@ -53,7 +53,7 @@ django-pylibmc \
FROM alpine:3.9 FROM alpine:3.9
RUN apk add \ RUN apk add --no-cache \
bash \ bash \
socat \ socat \
python3 \ python3 \