-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile
40 lines (34 loc) · 1.75 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM --platform=linux/amd64 debian:bullseye-slim
MAINTAINER Robin Grönerg <robingronberg@gmail.com>
ENV VERSION=10.0.1
ENV DOCKERIZE_VERSION v0.6.1
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends \
procps python3 python3-dev python3-setuptools python3-pip \
python3-wheel curl sqlite3 default-libmysqlclient-dev \
build-essential autoconf libtool pkg-config \
libffi-dev libjpeg-dev zlib1g-dev && \
pip3 install --timeout=3600 \
pylibmc jinja2 "sqlalchemy<2" python3-ldap \
django-pylibmc lxml \
future==0.18.* mysqlclient==2.1.* \
Pillow==9.5.0 captcha==0.5.* \
django_simple_captcha==0.5.20 \
djangosaml2==1.5.* pysaml2==7.2.* \
pycryptodome==3.16.* cffi==1.15.1 && \
apt-get purge -y \
python3-dev python3-setuptools python3-pip python3-wheel \
build-essential autoconf libtool pkg-config && \
apt-get autoremove -y && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /root/.cache /usr/share/doc/* && \
find / -type f -name '*.py[co]' -delete -or -type d -name '__pycache__' -delete && \
curl -L https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz | tar -xz -C /usr/local/bin && \
useradd -d /seafile -M -s /bin/bash -c "Seafile User" seafile && \
mkdir -p /opt/haiwen /seafile/
RUN curl -sL $(curl -sL https://www.seafile.com/en/download/ \
| grep -oE 'https://.*seafile-server.*x86-64.tar.gz' \
| sed -e "s/[0-9]+\.[0-9]+\.[0-9]+/$VERSION/g" | grep $VERSION \
| sort -r | head -1) \
| tar -C /opt/haiwen/ -xz \
&& chown -R seafile:seafile /seafile /opt/haiwen
COPY ["seafile-entrypoint.sh", "/usr/local/bin/"]
EXPOSE 8000 8082
ENTRYPOINT ["/usr/local/bin/seafile-entrypoint.sh"]