Comments (8)
Hi,
You need to mount your current folder into the image
docker run -v $(pwd):/home -w /home weboaks/node-karma-protractor-chrome npm test
You should run the image in the root folder of your project. The entrypoint will execute any command you pass to it.
from docker-node-karma-protractor-chrome.
What's the recommended way to install protractor into this image? And for my curiosity, why is it not included as part of the image itself?
Because the (default) user isn't root, I get this:
bash-4.4$ npm install -g protractor
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/node/.npm/_logs/2018-09-17T19_03_21_595Z-debug.log
from docker-node-karma-protractor-chrome.
@simondrabble the recommended way is to add protractor to your devDependencies and install it alongside your project dependencies.
If you want to install protractor globally, you can use the debian-root
or alpine-root
tags.
from docker-node-karma-protractor-chrome.
That should work, thanks! It just seemed weird to me that this image doesn't have "batteries included" like I would expect.
from docker-node-karma-protractor-chrome.
Most of the time, protractor and karma are installed via depDependencies, and would be installed two times if they were already installed globally. Not including them is the image reduce the image size for these users.
from docker-node-karma-protractor-chrome.
Sounds reasonable. Thanks again!
from docker-node-karma-protractor-chrome.
One more qq: where/ how should webdriver be installed? I don't see a way to start it under protractor. You might want to consider adding some more "getting started/ using this image" documentation :)
from docker-node-karma-protractor-chrome.
On the debian based variants, just use webdriver installed by protractor. On the alpine based variants, this webdriver isn't compatible with musl, and we have to use one already installed in the image (in /usr/bin/chromedriver)
from docker-node-karma-protractor-chrome.
Related Issues (20)
- selenium is not starting its server HOT 4
- Failing in bitbucket pipelines. Need help HOT 6
- Lost UI Shared context HOT 4
- chromeOptions not accepting window-size argument HOT 4
- Run command in documentation
- Not able to delete httpOnly:true secure: true cookie using deleteAllCookies() in headless chrome in protractor in docker HOT 1
- Chromium cannot be started from last rebuild HOT 3
- Protractor hangs on "I/launcher - 1 instance(s) of WebDriver still running" while using shardTestFiles: true in docker HOT 1
- The headless tag does not work anymore due to an update of ChromeDriver HOT 2
- Session not created for the chrome version HOT 10
- Headless not working since last update HOT 2
- Upgrade Chromium to latest stable? HOT 4
- What does latest point to? Can't find by digest. HOT 3
- Changes in alpine-node version HOT 1
- Root Tag help HOT 2
- Chrome version mismatch HOT 2
- Chromium version seems to be incompatible with chromedriver HOT 2
- New headless version is not compatible with puppeteer's bin (error while loading shared libraries: libXss.so) HOT 2
- image node tags & root access HOT 1
- Please created versioned Dockerfiles HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-node-karma-protractor-chrome.