Google Chrome in a Docker Container

(with sound and WebGL!)

If you’re a Linux enthusiast and haven’t already hopped on the Docker bandwagon, do.  Docker containers are a great way to deploy your web-based applications, or test out untrusted code, but they can also be used as a way to run apps on your Linux desktop that you might not fully trust.  It’s kind of like running your applications in a plastic bag — it makes it harder for them to break out and destroy your system.

Let’s run Google Chrome in a Docker container.

I will assume you are using Ubuntu 14.10.  First, install the latest Docker.  This tutorial expects Docker 1.4.1+.

Now, as a normal (unprivileged) user with sudo access, run the following commands in a shell:

sudo docker run transistor1/chrome config > start.sh
sudo chmod +x start.sh
./start.sh

You should be prompted for your sudo password, to run the Docker container.  That’s it! For subsequent runs, you can just run the

./start.sh

command.

Now, head on over to Chrome Experiments, and test out your WebGL and sound. Enjoy!