From 6698ac016cb58e2caa60d0804ca83f637e0e61de Mon Sep 17 00:00:00 2001 From: Sawyer Date: Tue, 5 Aug 2025 19:42:52 -0500 Subject: [PATCH] feat(container): add docker compose and docker docs --- README.md | 10 ++++++++++ docker-compose.yml | 20 ++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 docker-compose.yml diff --git a/README.md b/README.md index 92de96b..e61f726 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,16 @@ Simple HTTP proxy that renders pages with undetected-chromedriver and returns th ## Installation +### Container + +```sh +docker run --rm -p "32323:32323" ghcr.io/s4wyer/chromedriver-http-proxy # or s44wyer/chromedriver-http-proxy +``` + +There's also a [Docker compose example](/docker-compose.yml) with better config. + +### System + uv: ```sh diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..49bdd48 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,20 @@ +services: + chromedriver-http-proxy: + image: ghcr.io/s4wyer/chromedriver-http-proxy:latest + container_name: chromedriver-http-proxy + + ports: + - "32323:32323" + + environment: + - PROXY_PORT=32323 + - PROXY_HOST=0.0.0.0 + - SCRAPER_WAIT_TIME=10 + - SCRAPER_HEADLESS=True + - SCRAPER_USER_AGENT="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36" + + # Increase shared memory size to prevent Chromium from crashing. + # Recommended by Selenium https://hub.docker.com/r/selenium/standalone-chrome + shm_size: '2gb' + + restart: unless-stopped