Skip to content

Instantly share code, notes, and snippets.

@tabiodun
Last active August 22, 2020 08:06
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tabiodun/e4204ab83b3b7cfd2d28b478cf441162 to your computer and use it in GitHub Desktop.
Save tabiodun/e4204ab83b3b7cfd2d28b478cf441162 to your computer and use it in GitHub Desktop.
chromedriver dockerfile
FROM ubuntu:14.04
# Install Chromium build dependencies.
RUN echo "deb http://archive.ubuntu.com/ubuntu trusty multiverse" >> /etc/apt/sources.list # && dpkg --add-architecture i386
RUN apt-get update && apt-get install -qy git build-essential clang curl
# Install Chromium's depot_tools.
ENV DEPOT_TOOLS /usr/bin/depot_tools
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $DEPOT_TOOLS
ENV PATH $PATH:$DEPOT_TOOLS
RUN echo -e "\n# Add Chromium's depot_tools to the PATH." >> .bashrc
RUN echo "export PATH=\"\$PATH:$DEPOT_TOOLS\"" >> .bashrc
RUN git config --global https.postBuffer 1048576000
# Download Chromium sources.
RUN fetch --nohooks chromium
WORKDIR /
RUN gclient runhooks
WORKDIR src
RUN build/install-build-deps.sh --no-prompt
RUN gn gen out/Release --args="is_debug=false"
RUN ninja -C out/Release chromedriver
RUN cp out/Release/chromedriver /usr/bin/chromedriver
WORKDIR /
@davidthornton
Copy link

davidthornton commented Jul 7, 2017

Great Dockerfile!!! But do you have a binary copy of chromedriver 2.31 for linux_64?

@tabiodun
Copy link
Author

@davidthornton I did have a copy, but I didn't get a notification on this. I see you built one and have shared it with the community. Thanks for that!

@davidthornton
Copy link

davidthornton commented Aug 21, 2017

That's ok! All of the scrapers will have to learn how to compile it themselves anyway, to get rid of the static window elements that give it away lol!

@404notfound-3
Copy link

@davidthornton @tabiodun can we build chrome driver for windows?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment