question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to run cypress locally inside a local Docker?

See original GitHub issue

My Error:

cypress_1  | Cypress could not verify that this server is running:
cypress_1  | 
cypress_1  |   > http://localhost:3000
cypress_1  | 
cypress_1  | We are verifying this server because it has been configured as your `baseUrl`.
cypress_1  | 
cypress_1  | Cypress automatically waits until your server is accessible before running tests.

My docker-compose


# run Cypress tests and exit with command
#   docker-compose up --exit-code-from cypress
services:
  cypress:
    # the Docker image to use from https://github.com/cypress-io/cypress-docker-images
    image: "cypress/included:5.0.0"
    environment:
      - CYPRESS_baseUrl=http://localhost:3000
    # share the current folder as volume to avoid copying
    working_dir: /e2e
    command: "--browser chrome"
    ports:
      - 3333:3000
    volumes:
      - ./:/e2e

My config

  "baseUrl": "http://localhost:3000",
  "integrationFolder": "cypress/integration",
  "fileServerFolder": "dist",
  "viewportWidth": 1200,
  "viewportHeight": 1000,
  "chromeWebSecurity": true,
  "projectId": "3orb3g",
  "retries": {
    "runMode": 1,
    "openMode": 3
  }
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

9reactions
amirrustamcommented, Sep 16, 2020

The config in your base URL is different. It will also be helpful to provide a runnable reproduction.

0reactions
HackPointcommented, Oct 9, 2020

@HackPoint was @jprealini’s suggestion helpful?

No 😢

Read more comments on GitHub >

github_iconTop Results From Across the Web

Run Cypress with a single Docker command
Running headless tests ... Then you can execute your Cypress tests using the following shell command: $ docker run -it -v $PWD:/e2e -w...
Read more >
How to run cypress locally inside a local Docker? #733 - GitHub
run Cypress tests and exit with command # docker-compose up --exit-code-from cypress services: cypress: # the Docker image to use from ...
Read more >
Running Cypress Tests in Docker (Part 9) - Medium
You create your image once and run it anywhere on your local, inside ci/cd, or any other setups; With Cypress, you can use...
Read more >
Integrate Cypress with Docker in 5 minutes - Giridhar Rajkumar
Benefits of running Cypress tests in Docker · Cross-browser testing made simple and elegant · No additional / complex configurations required · No ......
Read more >
Executing Cypress scripts inside Docker Container - LinkedIn
Now that we have tried to execute the project locally and tested everything, we can further extend cypress tests to run inside a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found