add docker file, browser config and startapp
This commit is contained in:
37
Dockerfile
Normal file
37
Dockerfile
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
FROM jlesage/baseimage-gui:ubuntu-18.04
|
||||||
|
|
||||||
|
# Set environment variables
|
||||||
|
ENV TOR_VERSION=11.0.1
|
||||||
|
ENV APP_NAME="Tor Browser ${TOR_VERSION}" \
|
||||||
|
TOR_BINARY=https://www.torproject.org/dist/torbrowser/${TOR_VERSION}/tor-browser-linux64-${TOR_VERSION}_en-US.tar.xz \
|
||||||
|
TOR_SIGNATURE=https://www.torproject.org/dist/torbrowser/${TOR_VERSION}/tor-browser-linux64-${TOR_VERSION}_en-US.tar.xz.asc \
|
||||||
|
TOR_FINGERPRINT=0xEF6E286DDA85EA2A4BA7DE684E2C6E8793298290 \
|
||||||
|
DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Add wget and Tor browser dependencies
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y wget curl gpg libdbus-glib-1-2 libgtk-3-0 && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Download binary and signature
|
||||||
|
RUN wget $TOR_BINARY && \
|
||||||
|
wget $TOR_SIGNATURE
|
||||||
|
|
||||||
|
# Verify GPG signature
|
||||||
|
RUN curl -s https://openpgpkey.torproject.org/.well-known/openpgpkey/torproject.org/hu/kounek7zrdx745qydx6p59t9mqjpuhdf | gpg --import - && \
|
||||||
|
gpg --output ./tor.keyring --export $TOR_FINGERPRINT && \
|
||||||
|
gpgv --keyring ./tor.keyring "${TOR_SIGNATURE##*/}" "${TOR_BINARY##*/}"
|
||||||
|
|
||||||
|
# Extract browser & cleanup
|
||||||
|
RUN tar --strip 1 -xvJf "${TOR_BINARY##*/}" && \
|
||||||
|
chown -R ${USER_ID}:${GROUP_ID} /app && \
|
||||||
|
rm "${TOR_BINARY##*/}" "${TOR_SIGNATURE##*/}"
|
||||||
|
|
||||||
|
# Copy browser cfg
|
||||||
|
COPY browser-cfg /browser-cfg
|
||||||
|
|
||||||
|
# Add start script
|
||||||
|
COPY startapp.sh /startapp.sh
|
||||||
1
browser-cfg/.gitignore
vendored
Normal file
1
browser-cfg/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
mozilla.cfg
|
||||||
3
browser-cfg/autoconfig.js
Normal file
3
browser-cfg/autoconfig.js
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
// Any comment. You must start the file with a single-line comment!
|
||||||
|
pref("general.config.filename", "mozilla.cfg");
|
||||||
|
pref("general.config.obscure_value", 0);
|
||||||
3
browser-cfg/mozilla.cfg.template
Normal file
3
browser-cfg/mozilla.cfg.template
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
// Any comment. You must start the file with a comment!
|
||||||
|
|
||||||
|
lockPref("javascript.enabled", true);
|
||||||
18
startapp.sh
Normal file
18
startapp.sh
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "Configuring Tor browser"
|
||||||
|
|
||||||
|
cd /browser-cfg
|
||||||
|
if [ -f "mozilla.cfg" ]
|
||||||
|
then
|
||||||
|
echo "Copying browser config"
|
||||||
|
cp autoconfig.js /app/Browser/defaults/pref/autoconfig.js
|
||||||
|
cp mozilla.cfg /app/Browser/mozilla.cfg
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Starting Tor browser"
|
||||||
|
|
||||||
|
cd /app
|
||||||
|
./Browser/start-tor-browser --detach https://waitingroom.interdiscount.ch/de/sbb-halbtax
|
||||||
|
|
||||||
|
echo "Tor browser exited"
|
||||||
Reference in New Issue
Block a user