Last active
April 24, 2018 21:33
-
-
Save tabiodun/ca1f050f56acfc174d1448f3570b44c4 to your computer and use it in GitHub Desktop.
Dockerfile for tabiodun/selenium-chrome-headless
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/node-base:3.4.0-dysprosium | |
USER root | |
ARG CHROME_VERSION="google-chrome-beta" | |
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ | |
&& echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \ | |
&& apt-get update -qqy \ | |
&& apt-get -qqy install \ | |
${CHROME_VERSION:-google-chrome-beta} \ | |
&& rm /etc/apt/sources.list.d/google-chrome.list \ | |
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* | |
RUN wget --no-check-certificate https://chromedriver.storage.googleapis.com/2.31/chromedriver_linux64.zip \ | |
&& unzip chromedriver_linux64.zip \ | |
&& rm chromedriver_linux64.zip \ | |
&& mv -f chromedriver /usr/local/share/ \ | |
&& chmod +x /usr/local/share/chromedriver \ | |
&& ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver | |
ENTRYPOINT [ "/bin/bash"] |
@tabiodun, I'm a novice at Dockerfile inheritance, so please excuse my basic question. But is the idea here that:
- You're still inheriting from
selenium/node-base:3.4.0-dysprosium
, but providing a new entrypoint (ENTRYPOINT [ "/bin/bash"]
) - This new entrypoint overrides the CMD in the
selenium/node-base:3.4.0-dysprosium
, which isCMD ["/opt/bin/entry_point.sh"]
, and that entrypoint script runs xvfb.- Entrypoint script here: https://github.com/SeleniumHQ/docker-selenium/blob/c76f86bc7d7033b6086aaab6771223991725cee2/NodeBase/entry_point.sh
- So overriding the CMD doesn't run xvfb.
- P.S.: Is there anything necessary for selenium grid in the
entry_point.sh
, that isn't the xvfb stuff?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@graingert https://gist.github.com/tabiodun/e4204ab83b3b7cfd2d28b478cf441162