Shared dir. Support for other starting points than Firefox

This commit is contained in:
Otto Seiskari 2018-09-08 10:32:08 +03:00
parent 27c6d49e2c
commit f1cf5237cd
5 changed files with 11 additions and 6 deletions

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
openvpn
local
shared
*~

View File

@ -24,3 +24,4 @@ COPY files/start-openvpn-blocking.sh /home/user/
ENV HOME /home/user
ENTRYPOINT ["/bin/bash", "/home/user/start.sh"]
CMD ['firefox']

View File

@ -10,10 +10,10 @@ without any cookies, history or such.
2. (optional) Create a directory `openvpn` and put your `openvpn.conf` there.
Make sure it's called `openvpn.conf` and all extra files it may need are
also in the `openvpn/` directory (this will be mounted in the container)
3. Start container `./run.sh`
3. Start container `./run.sh firefox`
Also `ASSERT_COUNTRY=Finland ./run.sh` to check that ifconfig.co thinks that
the your IP address is in a given country before starting Firefox.
Also `ASSERT_COUNTRY=Finland ./run.sh firefox` to check that ifconfig.co thinks
that the your IP address is in a given country before starting Firefox.
### Disclaimer

View File

@ -1,5 +1,7 @@
#!/bin/bash
set -e
COMMAND="$1"
echo "$COMMAND"
# If no profile ...
if [ ! -d "$HOME/.mozilla" ]; then
@ -30,4 +32,4 @@ if [ ! -z ${ASSERT_COUNTRY+x} ]; then
fi
# Start firefox
firefox
$COMMAND

4
run.sh
View File

@ -4,6 +4,8 @@ docker run -ti --rm -e DISPLAY \
--cap-add=NET_ADMIN --device /dev/net/tun \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v `pwd`/openvpn:/etc/openvpn \
-v `pwd`/shared:/home/user/Downloads \
-e ASSERT_COUNTRY \
--dns 1.1.1.1 \
docker-vpn-browser
docker-vpn-browser \
"$@"