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.83k stars 242 forks source link

screenshot write file access_denied #112

Closed crab21 closed 4 years ago

crab21 commented 4 years ago

Describe the bug

[root@VM_0_8_centos ~]#
[root@VM_0_8_centos ~]# ll
总用量 44
-rw-r--r-- 1 root root 36373 8月  21 20:21 chrome.json
drwxr-xr-x 2 root root  4096 8月  21 18:06 gogowang
drwxr-xr-x 2 root root  4096 8月  21 20:30 gowang
[root@VM_0_8_centos ~]#
[root@VM_0_8_centos ~]#
[root@VM_0_8_centos ~]#
[root@VM_0_8_centos ~]# docker container run -it  -v /root/gogowang:/usr/src/app --security-opt seccomp=chrome.json zenika/alpine-chrome --no-sandbox --window-size=1280,1696 --screenshot --hide-scrollbars https://www.baidu.com/
[0821/123145.415023:WARNING:dns_config_service_posix.cc(342)] Failed to read DnsConfig.
[0821/123145.590374:WARNING:dns_config_service_posix.cc(342)] Failed to read DnsConfig.
[0821/123147.392321:ERROR:headless_shell.cc(590)] Writing to file screenshot.png was unsuccessful, could not open file: FILE_ERROR_ACCESS_DENIED

What is the expected behavior?

......
writing to file  screenshot.png was success.

Looking forward to your reply. tks.

crab21 commented 4 years ago

solved

jlandure commented 4 years ago

Hi @crab21 👋

Thanks for the issue and happy you solved it. 👍

For the community, can you share your solution or the workaround you found?

And thanks for using this image. 🎉

austincollinpena commented 2 years ago

Yep, same issue here, @crab21 come save me!