2024-08-17 08:32:15 +00:00
|
|
|
FROM ubuntu:jammy@sha256:adbb90115a21969d2fe6fa7f9af4253e16d45f8d4c1e930182610c4731962658 AS build
|
2021-01-17 23:29:51 +00:00
|
|
|
|
2024-07-28 19:51:27 +00:00
|
|
|
RUN apt-get update && \
|
2024-07-28 22:30:14 +00:00
|
|
|
apt-get install -y software-properties-common wget && \
|
|
|
|
add-apt-repository ppa:longsleep/golang-backports
|
2021-01-17 23:29:51 +00:00
|
|
|
|
2024-08-14 06:55:58 +00:00
|
|
|
ENV SEAFILE_VERSION=11.0.12
|
2021-01-17 23:29:51 +00:00
|
|
|
|
2024-07-28 19:51:27 +00:00
|
|
|
WORKDIR /tmp
|
|
|
|
RUN wget https://raw.githubusercontent.com/haiwen/seafile-docker/master/build/seafile-build.sh
|
|
|
|
RUN wget https://raw.githubusercontent.com/haiwen/seafile-docker/master/build/seafile-build.py
|
|
|
|
RUN chmod +x ./seafile-build.sh
|
|
|
|
RUN ./seafile-build.sh ${SEAFILE_VERSION}
|
2021-01-21 01:32:46 +00:00
|
|
|
|
2024-07-28 12:54:36 +00:00
|
|
|
FROM alpine:3.20.2 AS clean
|
|
|
|
|
2024-08-14 06:55:58 +00:00
|
|
|
ENV SEAFILE_VERSION=11.0.12
|
2024-07-28 12:54:36 +00:00
|
|
|
|
2024-07-28 19:51:27 +00:00
|
|
|
COPY --from=build /tmp/seafile-server-${SEAFILE_VERSION} /tmp/seafile-server-${SEAFILE_VERSION}
|
2024-07-28 12:54:36 +00:00
|
|
|
|
|
|
|
RUN rm -rf /tmp/seafile-server-${SEAFILE_VERSION}/seahub
|
|
|
|
|
2024-08-17 08:32:15 +00:00
|
|
|
FROM ubuntu:jammy@sha256:adbb90115a21969d2fe6fa7f9af4253e16d45f8d4c1e930182610c4731962658 AS pip
|
2023-10-18 18:39:17 +00:00
|
|
|
|
|
|
|
RUN apt-get update && \
|
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
|
|
|
python3 \
|
|
|
|
python3-pip \
|
2024-02-19 10:29:04 +00:00
|
|
|
libldap2-dev \
|
|
|
|
libsasl2-dev \
|
2023-10-18 18:39:17 +00:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
RUN pip3 install --target /pip-deps --timeout=3600 --no-cache-dir \
|
2024-08-05 20:08:05 +00:00
|
|
|
sqlalchemy==2.0.32 \
|
2024-02-19 10:00:31 +00:00
|
|
|
click==8.1.7 \
|
2024-02-19 10:05:18 +00:00
|
|
|
termcolor==2.4.0 \
|
2024-02-19 10:03:03 +00:00
|
|
|
colorlog==6.8.2 \
|
2024-05-21 22:45:44 +00:00
|
|
|
pymysql==1.1.1 \
|
2024-05-06 00:46:45 +00:00
|
|
|
jinja2==3.1.4 \
|
2024-02-19 10:01:27 +00:00
|
|
|
pycryptodome==3.20.0 \
|
2024-08-10 18:24:40 +00:00
|
|
|
lxml==5.3.0 \
|
2024-08-01 18:04:49 +00:00
|
|
|
python-ldap==3.4.4 \
|
2024-09-11 03:11:14 +00:00
|
|
|
pytz==2024.2 \
|
2024-08-06 15:43:58 +00:00
|
|
|
django==4.2.15 \
|
2024-08-01 19:10:10 +00:00
|
|
|
requests==2.32.3 \
|
2024-08-06 21:17:47 +00:00
|
|
|
PyYAML==6.0.2 \
|
2024-08-01 19:10:10 +00:00
|
|
|
defusedxml==0.7.1 \
|
|
|
|
json5==0.9.25
|
2023-10-18 18:39:17 +00:00
|
|
|
|
|
|
|
RUN find /pip-deps -name "__pycache__" -type d -exec rm -r {} + && \
|
|
|
|
rm -rf /pip-deps/pip /pip-deps/wheel /pip-deps/setuptools
|
|
|
|
|
2024-08-17 08:32:15 +00:00
|
|
|
FROM ubuntu:jammy@sha256:adbb90115a21969d2fe6fa7f9af4253e16d45f8d4c1e930182610c4731962658
|
2021-01-17 23:29:51 +00:00
|
|
|
|
2024-08-14 06:55:58 +00:00
|
|
|
ENV SEAFILE_VERSION=11.0.12
|
2023-10-18 18:39:17 +00:00
|
|
|
|
2021-01-23 12:26:43 +00:00
|
|
|
RUN apt-get update && \
|
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
2024-02-14 10:06:18 +00:00
|
|
|
netcat-openbsd \
|
2021-01-23 11:12:46 +00:00
|
|
|
socat \
|
2021-02-01 17:13:29 +00:00
|
|
|
cron \
|
2021-01-23 11:12:46 +00:00
|
|
|
tzdata \
|
2021-01-23 12:26:43 +00:00
|
|
|
psmisc \
|
|
|
|
net-tools \
|
|
|
|
libmariadb-dev \
|
2021-11-11 20:46:35 +00:00
|
|
|
ldap-utils \
|
|
|
|
ca-certificates \
|
2021-01-23 11:12:46 +00:00
|
|
|
python3 \
|
2021-01-23 12:26:43 +00:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2021-01-23 11:12:46 +00:00
|
|
|
|
2023-10-18 18:39:17 +00:00
|
|
|
COPY --from=pip /pip-deps /usr/local/lib/python3.10/dist-packages
|
2024-02-19 10:28:38 +00:00
|
|
|
|
2024-07-28 12:54:36 +00:00
|
|
|
COPY --from=clean /tmp/seafile-server-${SEAFILE_VERSION} /opt/seafile/seafile-server-${SEAFILE_VERSION}
|
2024-08-01 18:04:49 +00:00
|
|
|
COPY --from=build /tmp/seafile-server-${SEAFILE_VERSION}/seahub/thirdpart/seafobj /opt/seafile/seafile-server-${SEAFILE_VERSION}/seahub/thirdpart/seafobj
|
2024-08-01 19:10:10 +00:00
|
|
|
COPY --from=build /tmp/seafile-server-${SEAFILE_VERSION}/seahub/thirdpart/wsgidav /opt/seafile/seafile-server-${SEAFILE_VERSION}/seahub/thirdpart/wsgidav
|
|
|
|
COPY --from=build /tmp/seafile-server-${SEAFILE_VERSION}/seahub/thirdpart/gunicorn /opt/seafile/seafile-server-${SEAFILE_VERSION}/seahub/thirdpart/gunicorn
|
|
|
|
COPY --from=build /tmp/seafile-server-${SEAFILE_VERSION}/seahub/thirdpart/pkg_resources /opt/seafile/seafile-server-${SEAFILE_VERSION}/seahub/thirdpart/pkg_resources
|
|
|
|
COPY --from=build /tmp/seafile-server-${SEAFILE_VERSION}/seahub/thirdpart/setuptools /opt/seafile/seafile-server-${SEAFILE_VERSION}/seahub/thirdpart/setuptools
|
2024-07-30 13:38:36 +00:00
|
|
|
COPY --from=build /tmp/seafile-server-${SEAFILE_VERSION}/seahub/scripts /opt/seafile/seafile-server-${SEAFILE_VERSION}/seahub/scripts
|
2024-07-30 13:38:47 +00:00
|
|
|
COPY --from=build /tmp/seafile-server-${SEAFILE_VERSION}/seahub/tools /opt/seafile/seafile-server-${SEAFILE_VERSION}/seahub/tools
|
2024-07-30 14:02:27 +00:00
|
|
|
COPY --from=build /tmp/seafile-server-${SEAFILE_VERSION}/seahub/sql /opt/seafile/seafile-server-${SEAFILE_VERSION}/seahub/sql
|
2024-07-28 19:51:27 +00:00
|
|
|
COPY --from=build /tmp/seafile-server-${SEAFILE_VERSION}/seahub/media/avatars /opt/seafile/seafile-server-${SEAFILE_VERSION}/seahub/media/avatars
|
|
|
|
COPY --from=build /tmp/seafile-server-${SEAFILE_VERSION}/seahub/seahub/settings.py /opt/seafile/seafile-server-${SEAFILE_VERSION}/seahub/seahub/settings.py
|
2023-10-18 18:39:17 +00:00
|
|
|
|
2021-01-23 11:12:46 +00:00
|
|
|
COPY scripts /scripts
|
|
|
|
RUN chmod u+x /scripts/*
|
2021-01-23 12:26:43 +00:00
|
|
|
|
2021-01-24 15:03:01 +00:00
|
|
|
RUN mkdir -p /opt/seafile/logs &&\
|
2021-02-01 17:13:44 +00:00
|
|
|
touch /opt/seafile/logs/common.log &&\
|
|
|
|
ln -sf /opt/seafile/logs/common.log /opt/seafile/logs/seafile.log &&\
|
|
|
|
ln -sf /opt/seafile/logs/common.log /opt/seafile/logs/controller.log &&\
|
|
|
|
ln -sf /opt/seafile/logs/common.log /opt/seafile/logs/ccnet.log &&\
|
|
|
|
ln -sf /opt/seafile/logs/common.log /opt/seafile/logs/gc.log &&\
|
2021-11-11 20:46:35 +00:00
|
|
|
ln -sf /opt/seafile/logs/common.log /opt/seafile/logs/seafdav.log &&\
|
2023-06-17 09:18:42 +00:00
|
|
|
ln -sf /opt/seafile/logs/common.log /opt/seafile/logs/notification-server.log &&\
|
|
|
|
ln -sf /opt/seafile/logs/common.log /opt/seafile/logs/seafile-monitor.log &&\
|
2023-10-18 13:36:05 +00:00
|
|
|
mkdir -p /etc/ldap/ && echo "TLS_REQCERT allow" >> /etc/ldap/ldap.conf
|
2021-01-24 15:03:01 +00:00
|
|
|
|
2023-06-17 08:36:59 +00:00
|
|
|
EXPOSE 8001 8080 8082 8083
|
2021-01-17 23:29:51 +00:00
|
|
|
|
2024-07-28 12:54:36 +00:00
|
|
|
CMD ["/scripts/start.sh"]
|