Last active
March 17, 2019 18:00
-
-
Save rostegg/3930e5c71410981f3d0d2e63c2092239 to your computer and use it in GitHub Desktop.
Build and run latest Tor Browser version in docker container
This file contains hidden or 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
| #!/bin/bash | |
| TEMP_DATA=$(wget https://www.torproject.org/download/download-easy.html.en -q -O - | tr -d '[:space:]') | |
| VERSION=$(echo "$TEMP_DATA" | grep -o -P '(?<=\"torbrowserbundlelinux64\":\").*?(?=\"}\<\/span\>)') | |
| echo ${VERSION} | |
| sudo docker build --tag=rostegg/tor-browser --build-arg TOR_VERSION=${VERSION} . |
This file contains hidden or 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 ubuntu:16.04 | |
| ENV DEBIAN_FRONTEND noninteractive | |
| ENV TOR_LANGUAGE en-US | |
| ARG TOR_VERSION=8.0.0 | |
| RUN apt-get update && \ | |
| apt-get install -y \ | |
| iceweasel \ | |
| xauth \ | |
| xz-utils \ | |
| wget && \ | |
| apt-get clean | |
| ENV HOME /home/tor | |
| RUN useradd --create-home --home-dir $HOME tor && \ | |
| chown -R tor:tor $HOME | |
| RUN cd /tmp && \ | |
| wget https://dist.torproject.org/torbrowser/${TOR_VERSION}/tor-browser-linux64-${TOR_VERSION}_${TOR_LANGUAGE}.tar.xz && \ | |
| tar -vxJ --strip-components 1 -C /usr/local/bin -f tor-browser-linux64-${TOR_VERSION}_${TOR_LANGUAGE}.tar.xz && \ | |
| chown -R tor:tor /usr/local/bin | |
| WORKDIR $HOME | |
| USER tor | |
| CMD [ "/usr/local/bin/Browser/start-tor-browser", "--log", "/dev/stdout", "http://hss3uro2hsxfogfq.onion/" ] |
This file contains hidden or 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
| #!/bin/bash | |
| sudo docker run -it -e DISPLAY=unix$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --privileged rostegg/tor-browser |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment