mycaptcha / Dockerfile
dragg2's picture
Update Dockerfile
d2d6db4 verified
raw
history blame contribute delete
523 Bytes
FROM python:3.11-slim-bookworm
ENV PYTHONUNBUFFERED=1 \
PLAYWRIGHT_BROWSERS_PATH=/ms-playwright \
SERVER_HOST=0.0.0.0 \
SERVER_PORT=7860
RUN useradd -m -u 1000 user
RUN mkdir -p /ms-playwright /app && chown -R user:user /ms-playwright /app
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir --root-user-action=ignore -r requirements.txt
RUN playwright install --with-deps chromium && chmod -R 755 /ms-playwright
COPY --chown=user:user . .
USER user
EXPOSE 7860
CMD ["python", "main.py"]