Guidance on running percy in node container (alpine) #727
-
I'm developing a project inside a node container and need to run my tests inside as well, but I keep running into socket errors. I'm using Percy with testcafe and I'm just trying to run a simple test to get started. I'm hoping for some guidance for what packages are required for my image to have this working properly. I'm not an expert in Docker, and searches that I've found have answers for debian but not alpine. Docker image:
Here's the output when I try to run the command:
And then it gets stuck. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hey @gablittledevshop! This will probably be hard to debug, alpine containers typically involve a lot of manual setup, so it could be a whole lot of things in that env that causes issues. Looking at the logs, I see you're setting your own chrome executable.
Which can be fine, but it's a pretty advanced thing to reach for since that impacts how the entire SDK works. Long history story short, changing versions of Chrome the SDK connects to can have a large impact (network interception bugs are plentiful across Chrome versions). I see we're connecting to a pretty old version ( |
Beta Was this translation helpful? Give feedback.
-
Hopefully this helps. Dockerfile
Build and run tests
Result
Puppeteer & Percy with node:lts vs node:lts-alpine |
Beta Was this translation helpful? Give feedback.
Hopefully this helps.
Just adapt it to your needs.
Dockerfile
Build and run tests