garris / BackstopJS

Catch CSS curve balls.
http://backstopjs.org
MIT License
6.71k stars 603 forks source link

I can't run BackstopJS tests on Docker #1289

Open Antonytm opened 3 years ago

Antonytm commented 3 years ago

Steps to reproduce, I run next commands(tried Windows Command Prompt and Windows Powershell): 1) npm i backstopjs -g 2) backstopjs init 3) backstopjs test 4) backstopjs approve 5) backstop test --docker

Expected result: The test should be executed in the same way as on step 3 Actual result:

BackstopJS v5.1.0
Loading config:  C:\Source\backstopJSRunner\backstop.json

COMMAND | Executing core for "test"
Delegating command to Docker... docker run --rm -it --mount type=bind,source="C:\Source\backstopJSRunner",target=/src backstopjs/backstopjs:5.1.0 test "--moby"
docker: Error response from daemon: invalid mount config for type "bind": invalid mount path: '/src'.
See 'docker run --help'.
COMMAND | Executing core for "openReport"
openReport | Attempting to ping
   COMMAND | Command "test" ended with an error after [1.847s]
   COMMAND | Error: docker run --rm -it --mount type=bind,source="C:\Source\backstopJSRunner",target=/src backstopjs/backstopjs:5.1.0 test "--moby" returned 125
                 at ChildProcess.<anonymous> (C:\Users\Anton\AppData\Roaming\nvm\v12.18.3\node_modules\backstopjs\core\util\runDocker.js:68:18)
                 at ChildProcess.emit (events.js:315:20)
                 at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
openReport | Remote not detected. Opening backstop_data\html_report\index.html

C:\Source\backstopJSRunner>docker run --rm -it --mount type=bind,source="C:\Source\backstopJSRunner",target=/src backstopjs/backstopjs:5.1.0 test "--moby"
docker: Error response from daemon: invalid mount config for type "bind": invalid mount path: '/src'.
See 'docker run --help'.

image

garris commented 3 years ago

I believe this was fixed in 5.3.0... https://github.com/garris/BackstopJS/issues/1291#issuecomment-807972839

Antonytm commented 3 years ago

@garris

I have tried 5.3.0, but the result is the same. image