Created
November 17, 2016 20:12
-
-
Save BretFisher/90bf1b78cf51c29bf428ca361bdb1437 to your computer and use it in GitHub Desktop.
Dockerfile selenium with nodejs
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 selenium/standalone-chrome | |
# lets install node 6.x then cleanup | |
# install build-essential and leave in case npm needs it | |
# we have to sudo because selenium defaults to seluser | |
WORKDIR /tmp | |
ADD https://deb.nodesource.com/setup_6.x nodesource_setup.sh | |
RUN sudo bash nodesource_setup.sh \ | |
&& sudo apt-get install -y nodejs build-essential \ | |
&& sudo rm -rf /var/lib/apt/lists/* | |
# prep for our nodejs app | |
RUN sudo mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
# cache package.json and node_modules to speed up builds | |
COPY package.json package.json | |
RUN sudo npm install | |
# Add your source files | |
COPY . . | |
CMD ["npm","start"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment