Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Dockerfile with chromedriver
# See https://codeship.com/documentation/docker/browser-testing/
FROM myapp:base
# We need wget to set up the PPA and xvfb to have a virtual screen and unzip to install the Chromedriver
RUN apt-get install -y wget xvfb unzip
# Set up the Chrome PPA
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list
# Update the package list and install chrome
RUN apt-get update -y
RUN apt-get install -y google-chrome-stable
# Set up Chromedriver Environment variables
ENV CHROMEDRIVER_VERSION 2.19
ENV CHROMEDRIVER_DIR /chromedriver
RUN mkdir $CHROMEDRIVER_DIR
# Download and install Chromedriver
RUN wget -q --continue -P $CHROMEDRIVER_DIR "http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip"
RUN unzip $CHROMEDRIVER_DIR/chromedriver* -d $CHROMEDRIVER_DIR
# Put Chromedriver into the PATH
ENV PATH $CHROMEDRIVER_DIR:$PATH
@dnlserrano

This comment has been minimized.

Copy link

commented Jun 27, 2017

Thanks man! 👍

@ORESoftware

This comment has been minimized.

Copy link

commented Nov 6, 2017

why not use the default path of

/usr/bin/google-chrome

?

@xxholyChalicexx

This comment has been minimized.

Copy link

commented Dec 3, 2018

FROM myapp:base...... which image are you using?

@vladdoster

This comment has been minimized.

Copy link

commented Jan 5, 2019

FROM myapp:base...... which image are you using?

I think it is just a placeholder for an image that supports the commands!

@simonneutert

This comment has been minimized.

Copy link

commented Mar 29, 2019

you, sir, deserve an award for this! 🎉

@maram2012

This comment has been minimized.

Copy link

commented Aug 21, 2019

pull access denied for myapp, repository does not exist or may require 'docker login'
I got that error , what should i do ?

@tomreitsma

This comment has been minimized.

Copy link

commented Sep 1, 2019

@maram2012 it's a placeholder.. you should provide your own image base

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.