Last active
February 25, 2018 05:50
-
-
Save orleika/aa3667851a908c078078274f1a98fdfd to your computer and use it in GitHub Desktop.
For selenium and tor browser
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 python:3 | |
RUN apt update \ | |
&& apt upgrade -y \ | |
&& apt install -y libdbus-glib-1-2 libgtk2.0-0 libX11-xcb-dev xvfb\ | |
&& rm -rf /var/lib/apt/lists/* \ | |
&& echo 'export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"' >> ~/.bash_profile \ | |
&& . ~/.bash_profile \ | |
&& cd /tmp \ | |
&& wget -q https://github.com/mozilla/geckodriver/releases/download/v0.17.0/geckodriver-v0.17.0-linux64.tar.gz \ | |
&& tar -xf ./geckodriver-v0.17.0-linux64.tar.gz \ | |
&& mv geckodriver /usr/bin/ \ | |
&& wget -q https://www.torproject.org/dist/torbrowser/7.5/tor-browser-linux64-7.5_en-US.tar.xz \ | |
&& tar -xf ./tor-browser-linux64-7.5_en-US.tar.xz \ | |
&& mv tor-browser_en-US /usr/bin/TorBrowser \ | |
&& pip3 install --upgrade pyvirtualdisplay selenium tbselenium | |
ENV TBB_PATH /usr/bin/TorBrowser | |
ENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH | |
VOLUME /work | |
WORKDIR /work | |
CMD ["python3"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment