siomiz / chrome

Docker Automated Build Repository for siomiz/chrome -- Google Chrome via VNC (or via Chrome Remote Desktop)
https://hub.docker.com/r/siomiz/chrome/
MIT License
201 stars 125 forks source link

Black screen VNC output when using docker volume #13

Open QGB opened 4 years ago

QGB commented 4 years ago

mkdir ~/test

docker run -v ~/test:/home/chrome -p 5900:5900 -e VNC_SCREEN_SIZE=1366x768 siomiz/chrome

QGB commented 4 years ago

image

QGB commented 4 years ago

2020-01-05 06:50:38,617 CRIT Supervisor running as root (no user in config file) 2020-01-05 06:50:38,623 INFO supervisord started with pid 1 2020-01-05 06:50:39,626 INFO spawned: 'xvfb' with pid 8 2020-01-05 06:50:39,629 INFO spawned: 'chrome' with pid 9 2020-01-05 06:50:39,632 INFO spawned: 'x11vnc' with pid 10 2020-01-05 06:50:40,000 INFO exited: chrome (exit status 21; not expected) 2020-01-05 06:50:40,000 INFO reaped unknown pid 28 2020-01-05 06:50:40,000 INFO reaped unknown pid 31 2020-01-05 06:50:41,002 INFO success: xvfb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2020-01-05 06:50:41,004 INFO spawned: 'chrome' with pid 151 2020-01-05 06:50:41,004 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2020-01-05 06:50:41,341 INFO reaped unknown pid 170 2020-01-05 06:50:41,344 INFO exited: chrome (exit status 21; not expected) 2020-01-05 06:50:41,346 INFO reaped unknown pid 153 2020-01-05 06:50:41,346 INFO reaped unknown pid 154 2020-01-05 06:50:43,769 INFO spawned: 'chrome' with pid 273 2020-01-05 06:50:44,068 INFO exited: chrome (exit status 21; not expected) 2020-01-05 06:50:44,069 INFO reaped unknown pid 292 2020-01-05 06:50:44,070 INFO reaped unknown pid 275 2020-01-05 06:50:44,070 INFO reaped unknown pid 276 2020-01-05 06:50:47,076 INFO spawned: 'chrome' with pid 379 2020-01-05 06:50:47,388 INFO reaped unknown pid 398 2020-01-05 06:50:47,393 INFO exited: chrome (exit status 21; not expected) 2020-01-05 06:50:47,394 INFO gave up: chrome entered FATAL state, too many start retries too quickly 2020-01-05 06:50:47,396 INFO reaped unknown pid 381 2020-01-05 06:50:47,396 INFO reaped unknown pid 382

siomiz commented 4 years ago

Please consult/post the supervisor log of the failed container saved inside as /tmp/chrome-stderr---supervisor-<random>.log

Also note that the use of -p 5900:5900 is strongly discouraged (unless you have a NAT). Hope it's just for testing.

rylos commented 4 years ago

Same problem for me when using VOLUME and same log as previous posted one.

siomiz commented 4 years ago

Again,

Please consult/post the supervisor log of the failed container saved inside as /tmp/chrome-stderr---supervisor-<random>.log

Docker log (= supervisord activity log) only tells that chrome exited. Child process log should tell you why it exited.

jeffr1975 commented 3 years ago

I was having this blank screen problem. Manually creating the .config folder fixed this problem for me on a Windows host.

volumes:
- /run/desktop/mnt/host/c/Docker/Volumes/Chrome:/home/chrome:rw  

Created this folder ahead of time: C:\Docker\Volumes\Chrome\.config

This is a great container and very useful to me. Keep up the good work and please keep supporting it!

siomiz commented 3 years ago

Thanks @jeffr1975, that makes sense. Volumes get mounted as root-owned (there is a fun discussion here: moby/moby#2259) but Chrome inside container needs to read/write as user chrome (uid 1000), so the auto-creation of .config subdir must fail if empty home dir is mounted fresh.

I'll update entrypoint.sh to ensure ~/.config exists before starting Chrome.