Zenika / alpine-chrome

Chrome Headless docker images built upon alpine official image

Home Page:https://hub.docker.com/r/zenika/alpine-chrome

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted

robertsupport opened this issue · comments

Please tell me what I'm doing wrong?

docker run -it  zenika/alpine-chrome

Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted
[0908/094739.839947:FATAL:zygote_host_impl_linux.cc(187)] Check failed: ReceiveFixedMessage(fds[0], kZygoteBootMessage, sizeof(kZygoteBootMessage), &boot_pid). 
Received signal 6
  r8: 00000000000000c1  r9: 00007fa92f74114c r10: 0000000000000008 r11: 0000000000000246
 r12: 00007ffe84cf5630 r13: 0000000000000000 r14: 00007ffe84cf53e0 r15: 00000000000000a0
  di: 0000000000000002  si: 00007ffe84cf4d60  bp: 00007ffe84cf4d60  bx: 0000000000000006
  dx: 0000000000000000  ax: 0000000000000000  cx: 00007fa92f6f75b7  sp: 00007ffe84cf4d48
  ip: 00007fa92f6f75b7 efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000
 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
Calling _exit(1). Core file will not be generated.

When adding --no-sandbox - other errors appear

docker run -it  zenika/alpine-chrome --no-sandbox

[0908/101024.810903:WARNING:dns_config_service_posix.cc(340)] Failed to read DnsConfig.
[0908/101025.065766:ERROR:gpu_channel_manager.cc(398)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
[0908/101025.085427:WARNING:dns_config_service_posix.cc(340)] Failed to read DnsConfig.

help me please!

The same

Hi @robertsupport @gecube 👋

Thanks for the report 👍

I've tried these different command lines and it's working as expected:

  • docker run -it --rm --entrypoint "" zenika/alpine-chrome cat /etc/alpine-release
  • docker run -it --rm --entrypoint "" zenika/alpine-chrome chromium-browser --version
  • docker container run -u`id -u $USER` -it --rm -v $(pwd):/usr/src/app zenika/alpine-chrome --no-sandbox --screenshot --hide-scrollbars --window-size=412,732 https://www.chromestatus.com/
  • docker container run -it --rm --security-opt seccomp=$(pwd)/chrome.json zenika/alpine-chrome --no-sandbox --screenshot --hide-scrollbars --window-size=412,732 https://www.chromestatus.com/

Please notice that passing no argument will do nothing with this image. It just starts a Chrome, closes it and exits.

The first error seems normal because Chrome is using sandboxing by default. Please read this. I reproduced the error but it's normal.
The second error with no-sandbox doesn't seem a real problem because GPU is disallowed.

Last point, please use the issue template next time to fill an issue and give more feedback (see here).

Is it similar to #30? Can you explain what do you want to do with this image?

For your information, you can also read this troubleshooting section on Puppeteer if you're using a sandbox Chrome.

Hi @robertsupport 👋
Any news for your problem? Did you get the expected result? 👍

@jlandure Thanks. The new instructions are much more clear and I managed to get the capture of the website 👍

Hey @gecube Thanks for your feedback! 👌

docker container run -d -p 9222:9222 zenika/alpine-chrome --no-sandbox --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 https://www.chromestatus.com/

Container up with this command =)

@jlandure

I've put up a pull request to add @gecube! 🎉