43 lines
1.5 KiB
Docker
43 lines
1.5 KiB
Docker
# Use a base Python image
|
|
FROM python:3.11-slim
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Install necessary system packages for Playwright, GeoIP, and Xvfb
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
libgeoip1 \
|
|
# Xvfb for headless browser display
|
|
xvfb \
|
|
# Playwright browser dependencies
|
|
libnss3 libnspr4 libdbus-1-3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 libpango-1.0-0 libcairo2 libasound2 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Python dependencies: camoufox with geoip support and playwright==1.49
|
|
# Using --no-cache-dir to reduce image size
|
|
RUN pip install --no-cache-dir "camoufox[geoip]" playwright==1.49
|
|
|
|
# Install Playwright browsers for version 1.49
|
|
RUN playwright install --with-deps
|
|
|
|
# Copy the server script into the image
|
|
COPY camoufox_server.py .
|
|
|
|
# Create directory for extensions and copy them
|
|
RUN mkdir /app/extensions
|
|
COPY google_sign_in_popup_blocker-1.0.2.xpi /app/extensions/
|
|
COPY spoof_timezone-0.3.4.xpi /app/extensions/
|
|
COPY youtube_ad_auto_skipper-0.6.0.xpi /app/extensions/
|
|
|
|
# Expose the default port Camoufox might use (adjust if needed)
|
|
# This is informational; the actual port mapping is in docker-compose.
|
|
EXPOSE 12345
|
|
|
|
# Copy the wrapper script and make it executable
|
|
COPY start_camoufox.sh /app/
|
|
RUN chmod +x /app/start_camoufox.sh
|
|
|
|
# Default command executes the wrapper script.
|
|
# Arguments for camoufox_server.py will be passed via docker-compose command section.
|
|
ENTRYPOINT ["/app/start_camoufox.sh"]
|