Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

Google Chrome running in a Docker container!

Based on work done by Fábio Rehm.

Build the container

# git clone https://github.com/YarNhoj/docker-chrome.git && cd docker-chrome

Now build the container.

    # docker build -t <Repo>/docker-chrome .

Running the container

The idea is to bind mount your X11 socket into the container thus allowing it access to your xserver.

docker run -it --rm -e DISPLAY=${DISPLAY} -v /tmp/.X11-unix:/tmp/.X11-unix <Repo>/docker-chrome

The above runs an ephemeral container. IE your data is gone when the container is gone.
To maintain your data run:

docker run -it --rm -e DISPLAY=${DISPLAY} -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/<username>:/home/dev <Repo>/docker-chrome

This will mount your home directory inside the container and thus save your data in ~/.config/google-chrome

Feel free to swap out the --rm directive for -d to run the container in the background or change the username so that it mathes your own before you build the container.

Also in order for chrome to run you have to disable its sandboxing feature. That is done in the CMD directive of the Dockerfile.

Docker Pull Command
Owner
yarnhoj
Source Repository

Comments (0)