Reorganize browser strategy code into separate modules for better maintainability and separation of concerns. Improve Docker implementation with: - Add Alpine and Debian-based Dockerfiles for better container options - Enhance Docker registry to share configuration with BuiltinBrowserStrategy - Add CPU and memory limits to container configuration - Improve error handling and logging - Update documentation and examples BREAKING CHANGE: DockerConfig, DockerRegistry, and DockerUtils have been moved to new locations and their APIs have been updated.
24 lines
575 B
Docker
24 lines
575 B
Docker
# Use Debian 12 (Bookworm) slim for a small, stable base image
|
|
FROM debian:bookworm-slim
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# Install Chromium, socat, and basic fonts
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
chromium \
|
|
wget \
|
|
curl \
|
|
socat \
|
|
fonts-freefont-ttf \
|
|
fonts-noto-color-emoji && \
|
|
apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy start.sh and make it executable
|
|
COPY start.sh /start.sh
|
|
RUN chmod +x /start.sh
|
|
|
|
# Expose socat port (use host mapping, e.g. -p 9225:9223)
|
|
EXPOSE 9223
|
|
|
|
ENTRYPOINT ["/start.sh"]
|