-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
48 lines (40 loc) · 1.48 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
41
42
43
44
45
46
47
48
FROM debian:10-slim
ARG VERSION
ENV SEAFILE_VERSION=${VERSION} SEAFILE_SERVER=seafile-server
COPY requirements.txt /tmp/requirements.txt
WORKDIR /opt/seafile
COPY scripts /scripts
RUN apt update && \
apt upgrade -y && \
apt install -y --no-install-recommends python2.7 python-pil python-idna python-certifi python-pip python-wheel python-setuptools curl sqlite3 procps rsync && \
pip install -r /tmp/requirements.txt && \
rm -rf \
/root/.cache \
/root/.npm \
/root/.pip \
/usr/local/share/doc \
/usr/share/doc \
/usr/share/man \
/var/cache/* \
/var/lib/apt/lists/* \
/var/log/* \
/usr/share/info/* \
/usr/share/linda/* \
/usr/share/groff/* \
/usr/share/lintian/overrides/* \
/usr/share/omf/*/*-*.emf \
/tmp/* && \
mkdir -p /opt/seafile/ && \
curl -sSL -o - https://github.com/haiwen/seafile-rpi/releases/download/v${SEAFILE_VERSION}/seafile-server_${SEAFILE_VERSION}_stable_pi.tar.gz \
| tar xzf - -C /opt/seafile/ && \
python -m compileall -q /opt || : && \
chmod +x /scripts/gc.sh && \
groupadd -r -g 2500 seafile && \
useradd -Mr seafile --uid 2500 -g seafile && \
mkdir /shared /bootstrap /home/seafile /nginx && \
chown -R seafile:seafile /shared /bootstrap /opt/seafile /home/seafile /nginx
USER seafile
CMD ["python2", "/scripts/start.py"]
LABEL org.label-schema.name="Seafile server" \
org.label-schema.version=${VERSION} \
org.label-schema.docker.schema-version="1.0"