Sign inSign up

erseco/alpine-chromedriver

By erseco

Updated 23 days ago

Headless Chromium with ChromeDriver on Alpine Linux

Image
1

5.3K

erseco/alpine-chromedriver repository overview

Docker Chromium + ChromeDriver on Alpine Linux

Docker Pulls Docker Image Size alpine 3.24 chromium chromedriver License MIT

Lightweight Docker image with Chromium browser and ChromeDriver based on Alpine Linux.

Repository: https://github.com/erseco/alpine-chromedriver

  • Built on the lightweight Alpine Linux distribution
  • Includes both Chromium and ChromeDriver
  • Compact Docker image size (~300MB)
  • Runs under non-root user (nobody)
  • Multi-arch support (amd64, arm64, arm/v7)
  • Ready for Selenium, Puppeteer, Playwright or direct WebDriver usage
  • Uses dumb-init to properly handle signals and avoid zombie processes
  • Healthcheck to validate ChromeDriver is responding

Usage

Start 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.


Running with Docker Compose

Example docker-compose.yml:

services:
  chromedriver:
    image: erseco/alpine-chromedriver
    ports:
      - "9515:9515"
    restart: unless-stopped
  • image: Uses erseco/alpine-chromedriver.
  • ports: Maps ChromeDriver’s port 9515 to your host.
  • restart: Ensures the container is always available unless manually stopped.

Environment variables

The image defines some environment variables to simplify usage:

VariableDefaultDescription
CHROME_BIN/usr/bin/chromium-browserPath to Chromium binary
CHROME_PATH/usr/bin/chromium-browserAlias to Chromium binary
CHROMEDRIVER_BIN/usr/bin/chromedriverPath to ChromeDriver binary
CHROMIUM_FLAGS--no-sandbox --disable-dev-shm-usage --disable-gpu ...Default flags for Chromium (headless-safe)
DISPLAY:99Default display for X11/headless

When using Selenium or Puppeteer, ensure your client passes CHROMIUM_FLAGS if required.


Healthcheck

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.


Logs

By default, ChromeDriver runs with --verbose and logs to stdout:

docker logs -f <container_name>

Example: Run Selenium tests against this container

services:
  chromedriver:
    image: erseco/alpine-chromedriver
    ports:
      - "9515:9515"

  tests:
    image: selenium/standalone-tests
    environment:
      - WEBDRIVER_URL=http://chromedriver:9515
    depends_on:
      - chromedriver

License

MIT License. See LICENSE for details.

Tag summary

Content type

Image

Digest

sha256:7612f062d

Size

317 MB

Last updated

about 2 months ago

docker pull erseco/alpine-chromedriver