Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Dockerfile selenium with nodejs
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
RUN sudo bash \
&& 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
You can’t perform that action at this time.