How to Docker Install Chromium Version – Any Tips or Best Practices? Alternatively: What’s the Best W

18 Replies, 1130 Views

Subject: Struggling to docker install chromium version – any working solutions?

Hey folks,

Trying to docker install chromium version for some testing, but hitting a wall. Every guide I find seems outdated or just doesn’t work.

Anyone got a *working* setup? Preferably something lightweight.

Also, any best practices for keeping the image clean? Don’t wanna bloat it with unnecessary stuff.

Thanks in advance!

---

Or:

Subject: What’s the best way to docker install chromium version for testing?

Yo,

Need to docker install chromium version for automation testing. Seen a few images out there, but not sure which one’s reliable.

Any tips? Like, should I use the official image or roll my own?

Bonus Q: How do you handle updates? Manually rebuild or automate it?

Appreciate any advice!

---

Or:

Subject: How to docker install chromium version – any tips or best practices?

Hey all,

New to this, but trying to docker install chromium version for a project.

Any gotchas I should watch out for? Heard some folks have issues with GPU acceleration or missing deps.

Also, what’s your go-to base image? Alpine? Debian?

Thanks!
Hey! Had the same issue last week. Found that the `zenika/alpine-chrome` image works great for a lightweight docker install chromium version setup.

It’s based on Alpine, so it’s tiny, and it includes all the deps you need.

For updates, I just pull the latest tag and rebuild. Super simple.
Yo, if you’re hitting GPU issues, try adding `--disable-gpu` to your chromium flags.

Also, avoid the official image—it’s huge. Roll your own with Debian-slim and just install chromium-browser.

Here’s a quick Dockerfile snippet:
```
FROM debian:bullseye-slim
RUN apt-get update && apt-get install -y chromium
```
For automation testing, check out `selenium/standalone-chrome`. It’s preconfigured for docker install chromium version and works with Selenium out of the box.

Handles updates via tags, so you can pin to a specific version or use `latest`.

Bonus: Their docs are actually up-to-date.
Alpine is the way to go if you want lightweight. But heads up—you might run into missing libs.

I had to add a bunch of deps like `libstdc++` and `nss` to get it working.

Here’s a thread that saved me: [link to StackOverflow].
Pro tip: Use multi-stage builds to keep your image clean.

Install chromium in the first stage, then copy just the binaries to a fresh Alpine image.

Cuts the size in half and avoids bloat.
Man, I feel you. The official docs are a mess.

I ended up using `chromedp/headless-shell`—it’s optimized for headless testing and way lighter than full chromium.

No GPU hassles either.
If you’re on ARM, watch out—some images don’t support it.

Had to build my own for a Pi project. Used `balenalib/rpi-debian` as the base.

Took some tweaking, but it works.
Thanks for all the suggestions!

Tried the `zenika/alpine-chrome` image and it worked like a charm.

Still tweaking the flags for headless mode, but this is way better than what I was doing before.

Anyone got tips for reducing startup time? Feels a bit slow on first run.
For updates, I set up a GitHub Action to rebuild my image weekly.

Just pulls the latest chromium and pushes to my registry.

Might be overkill for some, but it’s fire-and-forget.



Users browsing this thread: 1 Guest(s)