Skip to content

Running Cypress via Docker fails to find path on cy.visit #25241

Answered by grenoult
grenoult asked this question in Docker
Discussion options

You must be logged in to vote

I found how to solve my problem.
In ./cypress/support/index.js, I can see there's Cypress.config('baseUrl', Cypress.env('HOST'));.
By setting my environment variable to the host I'm targeting, it works fine now:

docker run -v $PWD:/e2e -w /e2e -e CYPRESS_HOST=https://mytestsite.com cypress/included:4.11.0 --spec cypress/integration/automated/*.js

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by grenoult
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Docker
Labels
None yet
1 participant