/docker-chromium

Recipe to build the Chromium browser Docker image

Primary LanguageDockerfileMIT LicenseMIT

Chromium browser Docker image

About

Chromium browser in the Docker container.

Upstream Links

Image Contents

Quick Start

  • Configure environment:

    • DOCKER_REGISTRY: [OPTIONAL] registry prefix to pull image from a custom Docker registry:

        export DOCKER_REGISTRY="my_registry_hostname:5000/"
  • Pull prebuilt Docker image:

      docker-compose pull
  • Start prebuilt image:

      docker-compose up -d
  • Verify:

    Open http://localhost:8080 in web browser.

  • Stop/Restart:

      docker-compose stop
      docker-compose start

Configuration

Container can be configured using environment variables:

  • APP_UID: [OPTIONAL] UID to be used to run user-faced processes instead of default
  • APP_GID: [OPTIONAL] GID to be used to run user-faced process instead of default
  • SYS_UID: [OPTIONAL] UID to be used to run system processes instead of default
  • SYS_GID: [OPTIONAL] GID to be used to run system processes instead of default
  • DISPLAY_WIDTH: [OPTIONAL] the virtual display width in pixels
  • DISPLAY_HEIGHT: [OPTIONAL] the virtual display height in pixels
  • WEBSOCKIFY_PARAMS: [OPTIONAL] the extra command-line parameters to be passed to the websockify
  • CHROMIUM_PARAMS: [OPTIONAL] the extra command-line parameters to be passed to the Chromium
  • LOG_LEVEL: [OPTIONAL] the supervisord logging level. Set to debug to see services output
  • NET_GW: [OPTIONAL] the network default GW to be used instead of one assigned by Docker. This option requires --cap-add=NET_ADMIN

Build own image

  • default target platform:

      cd <path to sources>
      DOCKER_BUILDKIT=1 docker build --tag <tag name> .
  • arm64 target platform:

      cd <path to sources>
      DOCKER_BUILDKIT=1 docker build --platform=linux/arm64 --tag <tag name> .