ghostgle/Dockerfile
2026-07-29 00:05:23 +02:00

30 lines
No EOL
715 B
Docker

# temp stage
FROM python:3.12.2-slim AS builder
WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
RUN apt-get update && \
apt-get install -y --no-install-recommends gcc
COPY requirements.txt .
RUN pip wheel --no-cache-dir --no-deps --wheel-dir /app/wheels -r requirements.txt
# final stage
FROM python:3.12.2-slim
WORKDIR /app
# mostly install firefox to ensure all the libs are there
RUN apt-get update && \
apt-get install -y --no-install-recommends firefox-esr xvfb
COPY --from=builder /app/wheels /wheels
COPY --from=builder /app/requirements.txt .
RUN pip install --no-cache /wheels/*
RUN python -m camoufox fetch
COPY nosearch.html /app/nosearch.html
COPY main.py /app/main.py