cypress-docker-images
cypress-docker-images copied to clipboard
cypress docker image root user misconfiguration
We tried to run cypress docker image under Jenkins which runs all docker images with non-root account. Unfortunately, this is not possible without hack and modifications in the image itself.
I've investigated this a bit and it seems that the source of this issue is that cypress is installed under /root folder by default. This is misconfiguration because /root folder is not designed to host global libraries or software. It translated then to all sorts of problems, like libraries not resolving, difficulties to run images under SaaS CI providers, etc.
My proposal is to have cypress installed into /usr/local or whatever is provided by default npm configuration under used OS.
@ViliusS
There are Jenkins examples listed in the table:
cypress-io/cypress-example-kitchensink > CI Workflow Examples
The Jenkins examples use cypress/base Docker images.
Which type of Docker images were you having problems with (base/browsers/included)?
If you were not using cypress/base perhaps you would like to try that out.
Closing due to inactivity.
@MikeMcC399 sorry, I've totally missed your previous question. We were actually using cypress/factory image. We could in theory probably use base but we really don't want to take care of installing cypress ourselves. IMHO cypress (or any software for that matter) should not be installed into /root by default, be it custom or official image.
Thanks for your feedback and I have re-opened your issue.
The Cypress binary installs in /root
https://github.com/cypress-io/cypress-docker-images/blob/55c80b6bd6a64213f5544da91fc50dd966834075/factory/factory.Dockerfile#L24
The Cypress npm module installs in /usr/local/lib/node_modules which is standard for npm global installation.
https://github.com/cypress-io/cypress-docker-images/blob/55c80b6bd6a64213f5544da91fc50dd966834075/factory/factory.Dockerfile#L111-L113