You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
Carlos Hernandez 675e96d265 Adding Fts, closing issue #2:
* userdata volumes and url opening code were added to use docker-browser as full
        replacement name browser-exec.
    * browser-exec allows a user to launch a link in an exisitng browser or
        open up the link in the default browser define by env $BROWSER
    * added env variable ${DOCKER_BROWSER_PARMS} allowing user to pass
        aditional parms if he/she so wishes
    * added additional userdata volumes so that browser settins persist:
        $CHROME_USERDATA and $FIRFOX_USERDATA
    * made it easier for people who fork to test using make file by using env $USER
    * added clean function to Makefile
    * esnured USERDATA voluems are added to docker run command only withn
        wrapper script
    * if userdata volumes are used home directory of browser is created first,
        so added code to ensure home directory has right permissions and
        that /etc/skel files get copied to home directory
    * renamed some parms
    * tor install binary is now gpg verified and bumped a version closing
        issue#2
    * README.md includes information about making the settings for firefox and
        chrome survive after each time the browser is closed and opened.
    * nvidia-346 drivers are installed in container in order to fix some glx
        errors.
    * if browsers are launched with wrapper script then username within the
        container will be the username of the user executing
    * add fonts conf file, fixing font error, file copied from jfrazelle
9 years ago
confs Adding Fts, closing issue #2: 9 years ago
scripts Adding Fts, closing issue #2: 9 years ago
Dockerfile Adding Fts, closing issue #2: 9 years ago
LICENSE add license file 10 years ago
Makefile Adding Fts, closing issue #2: 9 years ago
README.md Adding Fts, closing issue #2: 9 years ago
entrypoint.sh Adding Fts, closing issue #2: 9 years ago

README.md

sameersbn/browser-box:latest

Introduction

Dockerfile to create a Docker container image consisting of the following web browsers:

  • chromium-browser
  • firefox
  • google-chrome
  • tor-browser

The image uses X11 and Pulseaudio unix domain sockets on the host to enable audio/video support in the web browsers. These components are available out of the box on pretty much any modern linux distribution.

browser

Contributing

If you find this image useful here's how you can help:

  • Send a pull request with your awesome features and bug fixes
  • Help users resolve their issues.
  • Support the development of this image with a donation

Issues

Before reporting your issue please try updating Docker to the latest version and check if it resolves the issue. Refer to the Docker installation guide for instructions.

SELinux users should try disabling SELinux using the command setenforce 0 to see if it resolves the issue.

If the above recommendations do not help then report your issue along with the following information:

  • Output of the docker version and docker info commands
  • The docker run command or docker-compose.yml used to start the image. Mask out the sensitive bits.
  • Please state if you are using Boot2Docker, VirtualBox, etc.

Getting started

Installation

This image is available as a trusted build on the Docker hub and is the recommended method of installation.

docker pull sameersbn/browser-box:latest

Alternatively you can build the image yourself.

git clone https://github.com/sameersbn/docker-browser-box.git
cd docker-browser-box
docker build --tag $USER/browser-box .

With the image locally available, install the wrapper scripts using:

docker run -it --rm \
  --volume /usr/local/bin:/target \
  sameersbn/browser-box:latest install

If you would the settings for chrome and firfox to persist afer each time the browser is launched then you will need to add additional environment variable to the install command. In the example below "username" needs to get replace with your loggin user name.

docker run -it --rm \
  --volume /usr/local/bin:/target \
  --env CHROME_USERDATA=/home/username/.chrome
  --env FIREFOX_USERDATA=/home/username/.mozillia
  sameersbn/browser-box:latest install

This will install wrapper scripts to launch:

  • chromium-browser
  • firefox
  • google-chrome, google-chrome-stable
  • tor-browser

Note

If the browser being launched is installed on the the host then the host binary is launched instead of starting a Docker container. To force the launch of a browser in a container use the browser-bundle script. For example, browser-bundle firefox will launch the Firefox browser inside a Docker container regardless of whether it is installed on the host or not.

Use Cases

  • Protect your anonymity on the internet (tor-browser)
  • Access websites your ISP has blocked (tor-browser)
  • Protection from Adobe Flash vulnerabilities
  • Guest access

How it works

The wrapper scripts volume mount the X11 and pulseaudio sockets in the launcher container. The X11 socket allows for the user interface display on the host, while the pulseaudio socket allows for the audio output to be rendered on the host.

Maintenance

Upgrading

To upgrade to newer releases:

  1. Download the updated Docker image:
docker pull sameersbn/browser-box:latest
  1. Run install to make sure the host scripts are updated.
docker run -it --rm \
  --volume /usr/local/bin:/target \
  sameersbn/browser-box:latest install

Uninstallation

docker run -it --rm \
  --volume /usr/local/bin:/target \
  sameersbn/browser-box:latest uninstall

Shell Access

For debugging and maintenance purposes you may want access the containers shell. If you are using Docker version 1.3.0 or higher you can access a running containers shell by starting bash using docker exec:

docker exec -it browser-box bash

References