Skip to content

Commit

Permalink
adds /dev/shm workaround to Docker common problems section in CI (cyp…
Browse files Browse the repository at this point in the history
…ress-io#2641)

* adds /dev/shm workaround to Docker common problems section in CI guide for issue cypress-io#2621

* Update source/guides/guides/continuous-integration.md

Co-Authored-By: Jennifer Shehane <[email protected]>

* Update source/guides/guides/continuous-integration.md

Co-Authored-By: Jennifer Shehane <[email protected]>

* Update source/guides/guides/continuous-integration.md

* Update source/guides/guides/continuous-integration.md

* Update source/guides/guides/continuous-integration.md

* Update source/guides/guides/continuous-integration.md

Co-authored-by: Jennifer Shehane <[email protected]>
  • Loading branch information
CypressCecelia and jennifer-shehane authored Mar 27, 2020
1 parent 520d12a commit 3bf3135
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions source/guides/guides/continuous-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,19 @@ See {% url bahmutov/yarn-cypress-cache https://github.com/bahmutov/yarn-cypress-

If you are running long runs on Docker, you need to set the `ipc` to `host` mode. {% issue 350 'This issue' %} describes exactly what to do.

In a Docker container, the default size of the `/dev/shm` shared memory space is 64MB. This is not typically enough to run Chrome and can cause the browser to crash. You can fix this by passing the `--disable-dev-shm-usage` flag to Chrome with the following workaround:

```javascript
module.exports = (on, config) => {
on('before:browser:launch', (browser = {}, launchOptions) => {
if (browser.family === 'chromium' && browser.name !== 'electron') {
launchOptions.args.push('--disable-dev-shm-usage')
}
return launchOptions
})
}
```
## Xvfb

When running on Linux, Cypress needs an X11 server; otherwise it spawns its own X11 server during the test run. When running several Cypress instances in parallel, the spawning of multiple X11 servers at once can cause problems for some of them. In this case, you can separately start a single X11 server and pass the server's address to each Cypress instance using `DISPLAY` variable.
Expand Down

0 comments on commit 3bf3135

Please sign in to comment.