cypress-io / cypress-docker-images Goto Github PK
View Code? Open in Web Editor NEWDocker images with Cypress dependencies and browsers
Home Page: https://on.cypress.io/continuous-integration
License: MIT License
Docker images with Cypress dependencies and browsers
Home Page: https://on.cypress.io/continuous-integration
License: MIT License
I imagine we would maintain multiple images, one for each Cypress release, so only one Cypress binary per image.
I am running my tests in chrome using -b chrome locally and I want to do the same in my pipeline but the images don't have chrome installed. When I install chrome into the image, I still get a failure.
Just noticed that recently we changed the default user to 'person' for cypress/base:8 image.
cypress-docker-images/Dockerfile
Lines 18 to 24 in 82624b8
The initial motivation is good but effectively creates problems downstream.
Imagine a typical Dockerfile for a cypress project:
FROM cypress/base:8
# default /home/person doesn't make sense as workdir
# since some hidden files with dot prefix may implicitly changed user behaviors
WORKDIR /home/person/cypress
# copied file owner will be root
COPY . /home/person/cypress
# have to switch back to root user or the next chown command would fail
USER root
RUN chown -R person /home/person/cypress
# switch back
USER person
RUN npm install
CMD ["npm", "test"]
As the above Dockerfile shows, it is really chaotic with the addition of USER person.
I would propose leaving the safety considerations back to user land, giving recommendations instead of dictating a user implicitly in a base image.
Without the USER person it could be like this:
FROM cypress/base:8
# run as non-root user inside the docker container
# see https://vimeo.com/171803492 at 17:20 mark
RUN groupadd -r regular-users && useradd -m -r -g regular-users person
# give new user access to global NPM modules folder
RUN chown person /usr/local/lib/node_modules
# give new user permission to install global tools
RUN chown person /usr/local/bin
WORKDIR /home/person/cypress
COPY . /home/person/cypress
RUN chown -R person /home/person/cypress
# run as person afterwards
USER person
RUN npm install
CMD ["npm", "test"]
point at the latest chrome browser (I think it is chrome67)
Hi,
I'm trying to run cypress run --browser chrome
in cypress/browsers:chrome62
image but seems that chrome is not starting. Do you know what the problem could be?
Dockerfile.:
FROM cypress/browsers:chrome62
COPY containers/ci/files /
COPY apps/ci/package.json /apps/ci/package.json
USER root
RUN chown -R person /apps/ci
USER person
RUN set -x \
# Install node modules
&& cd /apps/ci \
&& npm install
RUN set -x \
# Create directory structure for saving results
&& mkdir -p /apps/ci/results
COPY apps/ci/ /apps/ci
USER root
RUN chown -R person /apps/ci
USER person
Stacktrace:
person@1adbaed2497a:/apps/ci$ npm run cypress:run
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle @~precypress:run: @
npm info lifecycle @~cypress:run: @
> @ cypress:run /apps/ci
> cypress run --browser chrome
Warning: Cypress can only record videos when using the built in 'electron' browser.
You have set the browser to: 'chrome'
A video will not be recorded when using this browser.
(Tests Starting)
Timed out waiting for the browser to connect. Retrying...
Timed out waiting for the browser to connect. Retrying again...
The browser never connected. Something is wrong. The tests cannot run. Aborting...
(Tests Finished)
- Tests: 0
- Passes: 0
- Failures: 1
- Pending: 0
- Duration: 0 seconds
- Screenshots: 0
- Video Recorded: false
- Cypress Version: 1.0.3
(All Done)
npm info lifecycle @~cypress:run: Failed to exec cypress:run script
npm ERR! Linux 4.9.49-moby
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "cypress:run"
npm ERR! node v6.11.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! @ cypress:run: `cypress run --browser chrome`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ cypress:run script 'cypress run --browser chrome'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cypress run --browser chrome
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /apps/ci/npm-debug.log
After asking on the Gitter channel, @bahmutov asked me to report this here.
Discussion transcript:
Hugo Giraudel @HugoGiraudel_twitter 16:18
Hey there. Are you planning on updating this to Node 8: https://github.com/cypress-io/cypress-docker-images?Gleb Bahmutov @bahmutov 17:27
Hi @HugoGiraudel_twitter ! Yes, we do plan, but right now we match our dev environment to Electron's Node version (which because we are not at latest is Node 6). For consistency, as soon as Electron includes Node 8 we will upgrade our dev setup to Node 8 and then it makes sense to upgrade Docker image to include 8
Please open an issue in cypress-docker-images for this - and get notified as soon as it happens
We no longer need to install cypress-cli after cypress 0.20.0 but the README still has the example with instructions for installing cypress-cli.
Seems users have problems running our Cypress on Ubuntu 16
A week ago NodeJS 10.13 was tagged as lts, we upgrade our codebase but cypress/base becomes outdated.
Update the Dockerfile of cypress/base:10 to get node:10.13
I am not sure how to run Cypress in the chrome container. The cypress
binary doesn't seem to available in it.
$ docker run --rm cypress/browsers:chrome62 cypress run --browser chrome
docker: Error response from daemon: OCI runtime create failed: container_linux.go:295: starting container process caused "exec: \"cypress\": executable file not found in $PATH": unknown.
So it matches the links everywhere
Could you update cypress/base:8
image to the above versions? This will make use of the LTS version of Node and enable the npm ci
command (http://blog.npmjs.org/post/171556855892/introducing-npm-ci-for-faster-more-reliable).
Hi! We run docker in windows container mode and need to run cypress.
There is an open issue for this which need to be solved first.
For demo / example purposes, have temp image cypress/internal:cy-0.19.2
with Cypress already installed
If we create a separate user cypress
, even after giving him permissions to /usr/local
... the cypress install
still fails with
Step 4/7 : RUN cypress install
---> Running in a0b7ddd0e0f2
internal/streams/legacy.js:59
throw er; // Unhandled stream error in pipe.
^
Error: EACCES: permission denied, open './cypress.zip'
at Error (native)
The command '/bin/sh -c cypress install' returned a non-zero code: 1
Base image Dockerfile https://github.com/cypress-io/docker/blob/7af1395af2121b3d1a3c893e3f9aa51efef9c978/Dockerfile
and the Cypress install test Dockerfile
https://github.com/cypress-io/docker/blob/7af1395af2121b3d1a3c893e3f9aa51efef9c978/test/Dockerfile
Current image cypress/browsers:chrome62
is based on cypress:6
. Need make cypress/browsers:chrome64
based on cypress:8
image.
Need for testing Cypress Electron + Node upgrade cypress-io/cypress#1275
pipeline {
agent {
// this image provides everything needed to run Cypress
docker {
image 'cypress/base:10'
}
}
stages {
// first stage installs node dependencies and Cypress binary
stage('build') {
environment {
HOME = "."
}
steps {
echo "Running build ${env.BUILD_ID} on ${env.JENKINS_URL}"
timeout(time: 5, unit: 'MINUTES') {
nodejs(nodeJSInstallationName: 'Node 10.4.1', configId: 'npm') {
sh 'npm ci'
sh 'npm run cy:verify'
}
}
}
}
stage('start local server') {
steps {
// start local server in the background
// we will shut it down in "post" command block
timeout(time: 5, unit: 'MINUTES') {
nodejs(nodeJSInstallationName: 'Node 10.4.1', configId: 'npm') {
sh 'nohup npm start &'
}
}
}
}
// this tage runs end-to-end tests, and each agent uses the workspace
// from the previous stage
stage('cypress parallel tests') {
steps {
echo "Running build ${env.BUILD_ID}"
timeout(time: 5, unit: 'MINUTES') {
nodejs(nodeJSInstallationName: 'Node 10.4.1', configId: 'npm') {
sh "npm run cypress:headless"
}
}
}
}
}
post {
// shutdown the server running in the background
always {
echo 'Stopping local server'
timeout(time: 5, unit: 'MINUTES') {
nodejs(nodeJSInstallationName: 'Node 10.4.1', configId: 'npm') {
sh 'pkill -f http-server'
}
}
}
}
}
docker run -t -d -u 501:502 -w /var/lib/jenkins/workspace/-www_feature_ci-integration-GWZMSYY6XHJA7QDBD4KWGXZCOVUKOBI35JMKYOQV76QXZTCYE6CA@2 -v /var/lib/jenkins/workspace/-www_feature_ci-integration-GWZMSYY6XHJA7QDBD4KWGXZCOVUKOBI35JMKYOQV76QXZTCYE6CA@2:/var/lib/jenkins/workspace/-www_feature_ci-integration-GWZMSYY6XHJA7QDBD4KWGXZCOVUKOBI35JMKYOQV76QXZTCYE6CA@2:rw,z -v /var/lib/jenkins/workspace/-www_feature_ci-integration-GWZMSYY6XHJA7QDBD4KWGXZCOVUKOBI35JMKYOQV76QXZTCYE6CA@2@tmp:/var/lib/jenkins/workspace/-www_feature_ci-integration-GWZMSYY6XHJA7QDBD4KWGXZCOVUKOBI35JMKYOQV76QXZTCYE6CA@2@tmp:rw,z -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** cypress/base:10 cat
$ docker top 08b586a0c00a18cd2ed0b44ec7bf19a14986d76bc279f29652d99c42a574712d -eo pid,comm
[Pipeline] {
[Pipeline] stage
[Pipeline] { (build)
[Pipeline] echo
Running build 19 on ....
[Pipeline] timeout
Timeout set to expire in 5 min 0 sec
[Pipeline] {
[Pipeline] nodejs
Unpacking https://nodejs.org/dist/v10.4.1/node-v10.4.1-linux-x64.tar.gz to /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_10.4.1 on Amazon Linux AMI 2018.03.0 (i-07de9049df879a9eb)
$ /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_10.4.1/bin/npm install -g nsp
npm WARN deprecated [email protected]: The Node Security Platform service is shutting down 9/30 - https://blog.npmjs.org/post/175511531085/the-node-security-platform-service-is-shutting
/var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_10.4.1/bin/nsp -> /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_10.4.1/lib/node_modules/nsp/bin/nsp
+ [email protected]
added 115 packages from 50 contributors in 3.422s
copy managed file [npm] to file:/var/lib/jenkins/workspace/-www_feature_ci-integration-GWZMSYY6XHJA7QDBD4KWGXZCOVUKOBI35JMKYOQV76QXZTCYE6CA@2@tmp/config3565889387532646403tmp
[Pipeline] {
[Pipeline] sh
[-www_feature_ci-integration-GWZMSYY6XHJA7QDBD4KWGXZCOVUKOBI35JMKYOQV76QXZTCYE6CA@2] Running shell script
+ npm ci
Unhandled rejection Error: EACCES: permission denied, mkdir '/.npm'
Unhandled rejection Error: EACCES: permission denied, mkdir '/.npm'
Unhandled rejection Error: EACCES: permission denied, mkdir '/.npm'
No reason to have it.
I got some errors when trying to use the cypress/base because it still installs npm v5.7. This is the error message:
�[91mnpm�[0m�[91m ERR! write after end
�[0m�[91mnpm�[0m�[91m WARN notice [SECURITY] timespan has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=timespan&version=2.3.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
�[0m�[91mnpm�[0m�[91m WARN notice [SECURITY] minimatch has the following vulnerability: 1 high. Go here for more details: https://nodesecurity.io/advisories?search=minimatch&version=0.2.14 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
�[0m�[91mnpm�[0m�[91m WARN notice [SECURITY] minimatch has the following vulnerability: 1 high. Go here for more details: https://nodesecurity.io/advisories?search=minimatch&version=0.3.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
�[0m�[91mnpm�[0m�[91m �[0m�[91mWARN �[0m�[91mnotice [SECURITY] open has the following vulnerability: 1 critical. Go here for more details: https://nodesecurity.io/advisories?search=open&version=0.0.5 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
�[0m�[91mnpm WARN notice [SECURITY] tunnel-agent has the following vulnerability: 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=tunnel-agent&version=0.4.3 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
�[0m�[91mnpm �[0m�[91mWARN notice [SECURITY] debug has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=debug&version=3.0.1 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
�[0m�[91mnpm�[0m�[91m WARN notice [SECURITY] lodash has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=lodash&version=3.10.1 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
�[0m�[91mnpm WARN notice [SECURITY] lodash has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=lodash&version=3.7.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
�[0m�[91mnpm�[0m�[91m �[0m�[91mWARN�[0m�[91m �[0m�[91mnotice�[0m�[91m [SECURITY] hoek has the following vulnerability: 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=hoek&version=2.16.3 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
�[0m�[91mnpm�[0m�[91m WARN notice [SECURITY] lodash has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=lodash&version=4.3.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
�[0m�[91mnpm�[0m�[91m WARN notice [SECURITY] lodash has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=lodash&version=4.3.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
�[0m�[91mnpm WARN notice [SECURITY] lodash has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=lodash&version=0.9.2 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] lodash has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=lodash&version=0.9.2 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
�[0m�[91mnpm WARN notice [SECURITY] lodash has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=lodash&version=2.4.2 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
�[0m�[91mnpm�[0m�[91m WARN notice [SECURITY] lodash has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=lodash&version=4.17.4 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
�[0m�[91m
�[0m�[91mnpm�[0m�[91m ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-06-12T11_48_56_365Z-debug.log
�[0mThe command '/bin/sh -c npm install' returned a non-zero code: 1
I solved this by manually installing a new npm version in my Dockerfile:
FROM cypress/base
WORKDIR /usr/src/app
# Copy the application
COPY stuff.......
# Install new version of npm because cypress has 5.7
RUN npm install -g npm
RUN npm install
CMD npm run start
Shouldn't Cypress just use the latest version of npm?
Hey,
I am trying to setup test environment which can be run on CircleCI. Locally, everything works fine, however, when tried to tied up everything and run it on CI environment I am getting following problem:
^@^@XVFB exited with a non zero exit code.
There was a problem spawning Xvfb.
This is likely a problem with your system, permissions, or installation of Xvfb.
----------
Error: _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(EE)
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE)
----------
Platform: linux (Debian - 8.10)
Cypress Version: 3.1.0
Exited with code 1
Any idea how to solve this? Docker setup is quite straightforward, I've got three nodes apps running in parallel + mongodb + cypress in image:
Cypress Dockerfile:
FROM cypress/base:10
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
RUN yarn add [email protected]
COPY cypress.json /usr/src/app/cypress.json
RUN ./node_modules/.bin/cypress verify
Cypress part in docker-compose:
cypress:
user: root
volumes:
- ./e2e:/usr/src/app/e2e
build:
context: .
dockerfile: compose/cypress/Dockerfile
network_mode: 'host'
depends_on:
- api
And I am firing tests by running docker-compose -f docker-compose.e2e.yml run cypress ./node_modules/.bin/cypress run
. As I said, locally it's fine, but CI environment fails with error shared above.
I've also tried another solution - I wanted to use cypress node 10 image as base image for CircleCI and then run tests without docker, however, I need to run my apps from docker-compose and cypress image does not provide sudo and docker-compose as well.
Probably needed for some websites with sound.
Will need to rebuild the base image
It's confusing users and is deprecated with 0.20.0
.
https://gitter.im/cypress-io/cypress?at=59bf4703b59d55b8230c235c
Just nuke everything thats internal:cy
May I ask why there is no cypress pre-installed in any of the dockerfile?
I'm why not add a line like
RUN npm install -g cypress
in the dockerfile?
I found the cypress binary will be downloaded and unzipped every time I run the test (a new container will be built for every new test), I think it's a bit of waste. Wo can you tell me why not install the cypress in the official docker images?
Something like /browsers/firefox
add git client tools, see cypress-io/cypress-test-ci-environments#6
Run chrome docker container locally on Mac to confirm that browser connects successfully.
Maybe add Buildkite Mac CI tests.
Needs VNC too look into the container; what is going there.
TBD
Ties into cypress-io/cypress-documentation#208
Probably should use newer version of Node
CI : Bitbucket
package.json
"scripts": {
"cypress:start": "cypress run --browser chrome"
}
[bitbucket-pipelines.yml]
image: cypress/browsers:chrome69
options:
max-time: 20
pipelines:
default:
- step:
script:
- npm install
- npm run cypress:start
artifacts:
- /opt/atlassian/pipelines/agent/build/cypress/**
Everything starts fine, but the problem is with finding HTML elements in the chrome browser.
I have a few different tests and everywhere is the same problem with finding proper classes or id's.
The error which I got looks like:
CypressError: Timed out retrying: Expected to find element: '[id*=Login]', but never found it.
I also tried loading an image of chrome with the different versions - the same situation.
Locally (chrome) and with the electron on CI everything is fine.
I think, that problem maybe is with the docer image. Did anyone have a similar issue?
*Even artifacts doesn't load to the Bitbucket - but the information, that artifacts will be deleted in 6 days is displayed
When attempting to copy my cypress
directory the cypress image doesn't seem to want to acknowledge that the cypress
directory exists. I can rename the directory and its picked up with no issue.
amdingo@PC:/project$ docker build -t dingo/cypress -f cypress.Dockerfile .
Sending build context to Docker daemon 68.11MB
Step 1/8 : FROM cypress/browsers:chrome65-ff57
---> f6a9e90c31df
Step 2/8 : RUN mkdir /usr/src/app
---> Using cache
---> efa131325901
Step 3/8 : WORKDIR /usr/src/app
---> Using cache
---> f9649ac7dd00
Step 4/8 : RUN npm install [email protected]
---> Using cache
---> 16de63964510
Step 5/8 : RUN npm install faker
---> Using cache
---> 96a572132ab3
Step 6/8 : COPY cypress /usr/src/app/cypress
COPY failed: stat /var/lib/docker/tmp/docker-builder196847436/cypress: no such file or directory
rename cypress
to cypress_ci
amdingo@PC:/project$ mv ./cypress ./cypress_ci
Here I change step 6 to copy the new directory instead of cypress
amdingo@PC:/project$ vi cypress.Dockerfile
and run the docker build again
amdingo@PC:/project$ docker build -t cypress -f cypress.Dockerfile .
Sending build context to Docker daemon 70.4MB
Step 1/8 : FROM cypress/browsers:chrome65-ff57
---> f6a9e90c31df
Step 2/8 : RUN mkdir /usr/src/app
---> Using cache
---> efa131325901
Step 3/8 : WORKDIR /usr/src/app
---> Using cache
---> f9649ac7dd00
Step 4/8 : RUN npm install [email protected]
---> Using cache
---> 16de63964510
Step 5/8 : RUN npm install faker
---> Using cache
---> 96a572132ab3
Step 6/8 : COPY cypress_ci /usr/src/app/cypress
---> 1fc2aa73a66e
Step 7/8 : COPY cypress.json /usr/src/app/cypress.json
---> 51cbeecca047
Step 8/8 : RUN ./node_modules/.bin/cypress verify
---> Running in 9d6bd7de15f7
edit because markdown is hard :(
Hi, try to use docker image with FF browser, but get these error.
My Dockerfile:
FROM cypress/browsers:chrome67-ff57
RUN mkdir /crm2
COPY node_modules /crm2/node_modules
COPY cypress /crm2/cypress
COPY cypress.json /crm2/cypress.json
WORKDIR /crm2/
RUN npm i cypress
RUN firefox --version
RUN $(npm bin)/cypress run --record --key _mykey_ --browser firefox
Error:
Step 9/10 : RUN firefox --version
---> Running in 75ab532d867a
Mozilla Firefox 57.0.2
Removing intermediate container 75ab532d867a
---> e62e99e54c63
Step 10/10 : RUN $(npm bin)/cypress run --record --key 3ba9ef5e-06d4-4f4f-a758-1fc5c2b570bb --browser firefox
---> Running in 0643aceb5f48
[09:48:09] Verifying Cypress can run /root/.cache/Cypress/3.1.0/Cypress [started]
[09:48:10] Verified Cypress! /root/.cache/Cypress/3.1.0/Cypress [title changed]
[09:48:10] Verified Cypress! /root/.cache/Cypress/3.1.0/Cypress [completed]
Can't run because you've entered an invalid browser.
Browser: 'firefox' was not found on your system.
Available browsers found are: chrome, electron
UPD Without --key and --record I has same error.
Hi,
Using all images that you have provided I get the following error:
Test 1 - Desktop
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4771:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4771:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
My configuration is:
FROM cypress/base:10
RUN npm install --save-dev cypress
docker run -it -v=mye2e:mye2e -w="mye2e" <container name> /node_modules/cypress/bin/cypress run
Is there anything we need to do to surpass this problem?
We're using the docker image to avoid having to install cypress on every build.
Our docker image only runs this:
FROM cypress/base
RUN npm install -g cypress
We've used this to install cypress fine, then we could use it in our tests.
I've just tried running the build command for this docker, but we're now getting permission denied errors.
Step 3/3 : RUN npm install -g cypress // step 3 as I removed the maintainer line above
---> Running in 4a4330ea5831
/usr/local/bin/cypress -> /usr/local/lib/node_modules/cypress/bin/cypress
> [email protected] postinstall /usr/local/lib/node_modules/cypress
> node index.js --exec install
EACCES: permission denied, mkdir '/usr/local/lib/node_modules/cypress/dist'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node index.js --exec install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-04-17T14_22_58_013Z-debug.log
The command '/bin/sh -c npm install -g cypress' returned a non-zero code: 1
Has anything changed that could have caused this? We can create the folder manually, but it's still failing.
Very useful for testing Cypress installation from different Node versions.
Hello,
Is it possible to run Cypress GUI from inside the container?
My development environment is dockerized but I would still love to use your brilliant GUI.
Thanks
For security, create separate user for installing and running Cypress
Change docker hub to point at base:8 as latest and update readme
Anyone working on it?
I have a really urgent demand for it on the company I'm working right now and may try to tackle this if it is possible.
Is there any contributing guidelines that I should follow?
I'm running into some issues here because I am using Cypress for testing and the coverage tool from Codacy has a dependency that requires Node >=8.12.0
. From what I see, it looks like your base:8
image is at v8.11.3
.
Is it possible to upgrade it to the lastest 8
version. Happy to submit a PR if I'm pointed in the right direction.
Wait until Docker hub has an official image, here is their pull request nodejs/docker-node#696
Node.js is vulnerable to hash flooding attacks. Versions 4 to 8 have been hot-patched to fix the problem. Is there a way we could hotfix the Cypress docker image please?
Ref: https://nodejs.org/en/blog/vulnerability/july-2017-security-releases/.
Use the regular node user (?) instead of creating a new one.
Hi there!
Chrome 69 is the new version of stable chrome. In order to have consistency with CI (example, circleCI browsers are 69 now), rebuilding the images may be necessary, and retagged (as the current is cypress/browsers:chrome67
).
Thanks for your work,
W.
Seems we cannot run on Centos7 cypress-io/cypress#819
Need to make a base image
If Cypress reports a missing dependency when running cypress verify
like
/usr/lib/node_modules/cypress/dist/Cypress/Cypress: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
then we can find it using yum
, for example
yum whatprovides "libgtk-x11-2.0"
gtk2-2.24.31-1.el7.i686 : The GIMP ToolKit (GTK+), a library for creating GUIs for X
Repo : base
Matched from:
Provides : libgtk-x11-2.0.so.0
gtk2-2.24.31-1.el7.x86_64 : The GIMP ToolKit (GTK+), a library for creating GUIs for X
Repo : base
Matched from:
Provides : libgtk-x11-2.0.so.0()(64bit)
Then install appropriate package using
yum install -y gtk2-2.24*
I'm using Cypress in a CI fashion where I run my tests. This works fine, but I need a way to export the /test-results.xml file to the host container. Is there a way to do this or a best practice for it? I cannot use docker cp because I don't know the id of the container while it is running due to my CI provider's limitations.
Updating the node version in the latest cypress:base:10 broke my test builds because they were looking for a very specific node version. I'd recommend that if you're going to update the docker image, you version it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.