Zenika / alpine-chrome

Chrome Headless docker images built upon alpine official image
https://hub.docker.com/r/zenika/alpine-chrome
Apache License 2.0
1.82k stars 241 forks source link

Several error being reported on run #173

Open vladox opened 3 years ago

vladox commented 3 years ago

Describe the bug running the docker image as follows throw several errors:

[0502/080543.126186:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory. [0502/080543.178845:ERROR:vaapi_wrapper.cc(573)] Could not get a valid VA display

To Reproduce Steps to reproduce the behavior:

  1. Indicate the version of the image using docker image inspect --format='{{index .RepoDigests 0}}' zenika/alpine-chrome zenika/alpine-chrome@sha256:7e3b38744596dacbd8d37491a206ab6fce1eb8bcbbff4b8314af92b154638887
  2. Execute docker container run -it --rm --security-opt seccomp=$(pwd)/chrome.json zenika/alpine-chrome
  3. See error [0502/080543.126186:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory. [0502/080543.178845:ERROR:vaapi_wrapper.cc(573)] Could not get a valid VA display

What is the expected behavior? Run without displaying errors

What is the actual behavior?

Errors are shown in the output when running it

Possible solution

Logs If applicable, add logs to help explain your problem.

Versions

Software Version(s) How-to
Chromium 89.0.4389.72 docker container run -it --rm --entrypoint "" zenika/alpine-chrome chromium-browser --version
Image 7e3b38 docker image inspect --format='{{index .RepoDigests 0}}' zenika/alpine-chrome
Docker Engine 20.10.5 docker version

Additional context Add any other context about the problem here.

jlandure commented 3 years ago

Hi @vladox 👋

Thanks for the issue. 👍

Please give the entire command you launched to get the error.

FYI, if you only do a docker container run -it --rm --security-opt seccomp=$(pwd)/chrome.json zenika/alpine-chrome it will launch a chrome and close it. You have to give further arguments to do something in headless with this image.

AriVagelatos-KSO commented 9 months ago

If you are getting this error locally and you are using apple silicon, choose this in docker desktop settings: "Use Rosetta for x86/amd64 emulation on Apple Silicon"

Screenshot 2023-11-15 at 1 17 32 PM
MarijnMensinga commented 9 months ago

Thank you @ariv803 this worked flawlessly for me after hours and hours of head-scratching and scouring the internet