Created
February 10, 2018 20:28
-
-
Save MikaelSoderstrom/3fdcb4635af4fc67ba0f8071163ab6e8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 selenium/standalone-chrome | |
# TODO: Use volume shared with host instead | |
ADD . /protractor/project | |
USER root | |
# Installera some tools | |
RUN apt-get update -qqy \ | |
&& apt-get -qqy install \ | |
apt-utils \ | |
wget \ | |
sudo \ | |
curl | |
# Install Node.js | |
RUN apt-get update -qqy \ | |
&& apt-get -qqy install \ | |
software-properties-common \ | |
python-software-properties | |
RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - | |
RUN apt-get update -qqy \ | |
&& apt-get -qqy install \ | |
nodejs \ | |
build-essential | |
# TODO: Should only be used outside of docker. Remove when sharing volume. | |
RUN cd /protractor/project && node_modules/.bin/webdriver-manager update | |
WORKDIR /protractor/project | |
# Use bash to be able to login directly to bash on docker image. To just run tests, execute npm test directly. | |
ENTRYPOINT ["npm", "test"] | |
# ENTRYPOINT [ "bash" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Build
docker build . -t tests
Run
docker run -it -v c:\temp:/testresults tests
The volume is currently used by JUnitXmlReporter to create test results used by VSTS. I am going to make some changes so I can use a volume for the test files as well so I don´t need to build the image everytime I need to run the tests.
I am using headless Chrome and Firefox for the test runs.