soccerway
soccerway

Reputation: 11961

Run cypress test in a docker container?

How to run cypress test in a docker container ? I have created an account in docker and then as per link https://hub.docker.com/u/cypress and run the following command from my folder location in Desktop/Windows 10 : docker run -it -v $PWD:/e2e -w /e2e cypress/included:3.4.0

But I am getting following error. How can I resolve the error, can someone please advise.

docker: Error response from daemon: create $PWD: "$PWD" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path.

Upvotes: 0

Views: 1210

Answers (1)

Mihai
Mihai

Reputation: 10727

Depending on your OS you need to change $PWD to reflect your current folder (ex: $(pwd) on linux or MacOS).

If you can't figure it out just use an absolute path instead of $PWD, just like the docker hint indicates.

Upvotes: 2

Related Questions