Created
February 28, 2017 12:16
-
-
Save Xotabu4/a243d9ff25cfe276bcaa0175fb6a4b00 to your computer and use it in GitHub Desktop.
Simplest way to start protractor in container (as far as i know). Comments are welcome!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
selenium-chrome-standalone: | |
ports: | |
- "44444:4444" | |
image: "selenium/standalone-chrome" | |
e2e-tests: | |
build: . | |
links: | |
- selenium-chrome-standalone | |
depends_on: | |
- selenium-chrome-standalone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:7 | |
COPY . /e2e | |
WORKDIR /e2e | |
RUN npm install | |
CMD npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Config} from 'protractor'; | |
export let config: Config = { | |
seleniumAddress: 'http://selenium-chrome-standalone:4444/wd/hub', | |
// Other settings here... | |
}; |
Another option - is to use
entrypoint.sh
!#/bin/bash
exec npm $@
Dockerfile
...
...
COPY entrypoint.sh .
RUN chmod +x entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
docker-compose.yml
services:
e2e:
command:
- test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To start -
docker-compose build && docker-compose up