# https://github.com/Gronis/docker-seafile/blob/master/Dockerfile FROM --platform=linux/amd64 debian:bookworm-slim MAINTAINER Robin Grönerg ENV VERSION=11.0.8 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 RUN pip3 install --break-system-packages --timeout=3600 \ pylibmc jinja2 "sqlalchemy<2" python3-ldap \ django-pylibmc lxml \ future mysqlclient \ Pillow captcha \ django_simple_captcha \ djangosaml2 pysaml2 \ pycryptodome cffi RUN apt-get purge -y \ python3-dev python3-setuptools python3-pip python3-wheel \ build-essential autoconf libtool pkg-config RUN 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 RUN curl -L https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz | tar -xz -C /usr/local/bin RUN useradd -d /seafile -M -s /bin/bash -c "Seafile User" seafile RUN 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 RUN chown -R seafile:seafile /seafile /opt/haiwen RUN ln -s /usr/bin/python3 /usr/bin/python COPY ["seafile-entrypoint.sh", "/usr/local/bin/"] EXPOSE 8000 8082 ENTRYPOINT ["/usr/local/bin/seafile-entrypoint.sh"]