S3-to-WebDAV / Dockerfile
NathMen12's picture
Create Dockerfile
7a0318b verified
Raw History Blame Contribute Delete
754 Bytes
FROM python:3.11-slim
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
RCLONE_CONFIG=/tmp/rclone.conf
WORKDIR /app
# Dépendances système
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
ca-certificates \
unzip \
fuse \
&& rm -rf /var/lib/apt/lists/*
# Installation de rclone (dernière version stable)
RUN curl -sSL https://rclone.org/install.sh | bash && \
rclone version
# Dépendances Python
COPY requirements.txt .
RUN pip install --upgrade pip && \
pip install -r requirements.txt
# Code applicatif
COPY app.py .
# Port principal du Space (FastAPI + reverse proxy WebDAV)
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]