I realise this is a very niche question, but I was hoping someone here either knows the answer or can point me to a better place to ask.
My @[email protected] uses Puppeteer to take screenshots of the game for its posts. I want to run the bot on my Synology NAS inside of a Docker container so I can just set it and forget it, rather than needing to ensure my desktop is on and running the bot. Unfortunately, the Synology doesn’t seem to play nicely with Puppeteer’s use of the Chrome sandbox. I need to add the --no-sandbox
and --disable-setuid-sandbox
flags to get it to run successfully. That seems rather risky and I’d rather not be running it like that.
It works fine on my desktop, including if run in Docker for Windows on my desktop. Any idea how to set up Synology to have the sandbox work?
Try using this following project as your base image before throwing puppeteer on it (or use the inbuilt functionality to take screenshots). It includes Jessie Frazelle’s seccomp profile. If you want nightmares, go read her blogpost about it. Otherwise just let it be and follow the setup guide in the readme of this project -
https://github.com/jlandure/alpine-chrome
Honestly I can’t even figure out how to get that alpine-chrome image to work. I edited my Dockerfile to say
instead of
I tried changing
USER node
toUSER chrome
. I removed all the apt-get dependencies that were needed to get Puppeteer working in Docker on my PC in the first instance, and added--chown=chrome
to myCOPY package.json
line, all as described in the with-puppeteer example. I also added theENV
lines from that. (I also tried various combinations of some of the aforementioned changes but not others.) Now I get an error with thenpm install
step.Error message