Headless Chromium with ChromeDriver on Alpine Linux
5.3K
Lightweight Docker image with Chromium browser and ChromeDriver based on Alpine Linux.
Repository: https://github.com/erseco/alpine-chromedriver
nobody)dumb-init to properly handle signals and avoid zombie processesStart the Docker container and expose ChromeDriver port (default: 9515):
docker run -p 9515:9515 erseco/alpine-chromedriver
Check ChromeDriver status:
curl http://localhost:9515/status
Expected output includes "ready": true.
Example docker-compose.yml:
services:
chromedriver:
image: erseco/alpine-chromedriver
ports:
- "9515:9515"
restart: unless-stopped
erseco/alpine-chromedriver.The image defines some environment variables to simplify usage:
| Variable | Default | Description |
|---|---|---|
CHROME_BIN | /usr/bin/chromium-browser | Path to Chromium binary |
CHROME_PATH | /usr/bin/chromium-browser | Alias to Chromium binary |
CHROMEDRIVER_BIN | /usr/bin/chromedriver | Path to ChromeDriver binary |
CHROMIUM_FLAGS | --no-sandbox --disable-dev-shm-usage --disable-gpu ... | Default flags for Chromium (headless-safe) |
DISPLAY | :99 | Default display for X11/headless |
When using Selenium or Puppeteer, ensure your client passes CHROMIUM_FLAGS if required.
The container includes a healthcheck that queries ChromeDriver:
curl http://localhost:9515/status
If ChromeDriver is not responding with "ready": true, the container will be marked as unhealthy.
By default, ChromeDriver runs with --verbose and logs to stdout:
docker logs -f <container_name>
services:
chromedriver:
image: erseco/alpine-chromedriver
ports:
- "9515:9515"
tests:
image: selenium/standalone-tests
environment:
- WEBDRIVER_URL=http://chromedriver:9515
depends_on:
- chromedriver
MIT License. See LICENSE for details.
Content type
Image
Digest
sha256:7612f062d…
Size
317 MB
Last updated
about 2 months ago
docker pull erseco/alpine-chromedriver