loki icon indicating copy to clipboard operation
loki copied to clipboard

Chrome Docker not working with PnP

Open pseudoblau opened this issue 3 years ago • 2 comments

When using loki with yarn berry I run into the following problem when trying to use the chrome.docker target.

Command failed with exit code 125: docker run --rm -d -P 
       --security-opt=seccomp=/path/to/project/.yarn/cache/@loki-target-chrome-docker-npm-0.28.1-97983a2625-505432c991.zip/node_modules/@loki/target-chrome-docker/src/docker-seccomp.json --shm-size=1g -p 
       35465:35465 yukinying/chrome-headless-browser:90.0.4408.0 --disable-datasaver-prompt --no-first-run --disable-extensions --remote-debugging-address=0.0.0.0 --remote-debugging-port=35465 --headless --disable-gpu 
       --hide-scrollbars
       docker: opening seccomp profile (/path/to/project/.yarn/cache/@loki-target-chrome-docker-npm-0.28.1-97983a2625-505432c991.zip/node_modules/@loki/target-chrome-docker/src/docker-seccomp.json) failed: open 
       /path/to/project/.yarn/cache/@loki-target-chrome-docker-npm-0.28.1-97983a2625-505432c991.zip/node_modules/@loki/target-chrome-docker/src/docker-seccomp.json: not a directory.
       See 'docker run --help'.

Obviously docker cannot open the docker-seccomp.json file as it is stored in a zip file. When I extract the file and explicitly link it in https://github.com/oblador/loki/blob/afb5bde7d67d2ed3b6fa8f25244ec4e9f5e9c571/packages/target-chrome-docker/src/create-chrome-docker-target.js#L64 it works fine.

My naive approach would be to copy docker-seccomp.json to /tmp/something, but I am not sure as how to handle this best...

pseudoblau avatar Nov 17 '21 16:11 pseudoblau

Same issue here.

@pseudoblau Do you have a workaround for this?

cetteup avatar Mar 17 '22 12:03 cetteup

You can use --chromeDockerWithoutSeccomp to disable seccomp. Not sure if that helps you or not.

AntonNiklasson avatar Sep 15 '22 07:09 AntonNiklasson