https://github.com/hugojosefson/docker-chromium
Runs the Chromium browser, inside Docker.
https://github.com/hugojosefson/docker-chromium
chromium docker gui
Last synced: about 2 months ago
JSON representation
Runs the Chromium browser, inside Docker.
- Host: GitHub
- URL: https://github.com/hugojosefson/docker-chromium
- Owner: hugojosefson
- Created: 2022-01-01T16:22:30.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-28T20:12:10.000Z (over 4 years ago)
- Last Synced: 2025-07-09T21:17:19.167Z (12 months ago)
- Topics: chromium, docker, gui
- Language: Shell
- Homepage: https://hub.docker.com/r/hugojosefson/chromium
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker image docker.io/hugojosefson/chromium
Runs the Chromium browser, inside Docker.
## Usage
This docker image must be started as `root`, so don't use `docker
run --user=...`. Instead, pass environment variables `USER_NAME`,
`USER_ID`, `GROUP_NAME`, `GROUP_ID` (and optionally `HOME`) for the
user you want to become.
Example which gives Chromium access to the current directory, but
not your actual `HOME` on your host.
```bash
# Create a new temp directory to hold the user HOME inside the container
CHROMIUM_HOME=$(mktemp -d) # (or use another specific directory)
# Run Chromium using in the current directory, as yourself, with config
# saved in the new HOME
docker run --rm -it \
--env USER_ID="$(id -u)" \
--env USER_NAME="$(id -un)" \
--env GROUP_ID="$(id -g)" \
--env GROUP_NAME="$(id -gn)" \
--env HOME="${HOME}" \
--volume "${CHROMIUM_HOME}":"${HOME}" \
--volume /tmp/.X11-unix:/tmp/.X11-unix \
--env DISPLAY="unix${DISPLAY}" \
--volume "$(pwd)":"$(pwd)" \
--workdir "$(pwd)" \
docker.io/hugojosefson/chromium
```
## License
MIT