Last active
July 6, 2018 06:26
-
-
Save maurice-audin/ce429de428e5af3a344a to your computer and use it in GitHub Desktop.
Dockerfile for firefox + flash + pulseaudio
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM debian:sid | |
| # Install | |
| RUN echo "deb http://http.debian.net/debian sid main contrib" > /etc/apt/sources.list | |
| RUN apt-get -q update | |
| RUN apt-get -q install -y adduser ca-certificates iceweasel pulseaudio openssh-server | |
| RUN apt-get -q install -y flashplugin-nonfree | |
| RUN mkdir /var/run/sshd | |
| ADD id_dsa.pub /root/.ssh/authorized_keys | |
| # Add user (same name, uid, gid !!) | |
| RUN adduser --disabled-password --gecos hybris hybris | |
| ADD id_dsa.pub /home/hybris/.ssh/authorized_keys | |
| # Launch | |
| CMD /usr/sbin/sshd -D | |
| # Build with: | |
| # docker build --no-cache=true -t hybris:firefox . | |
| # Alias firefox to https://gist.github.com/hybris42/ce429de428e5af3a344a#file-firefox |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| # Launch container if stopped | |
| if ! docker top firefox > /dev/null 2>&1 | |
| then | |
| docker run --rm --name=firefox -h firefox \ | |
| -v /tmp/.X11-unix:/tmp/.X11-unix \ | |
| -v /home/hybris/.mozilla:/home/hybris/.mozilla \ | |
| -v /home/hybris/Downloads:/home/hybris/Downloads \ | |
| hybris:firefox & | |
| sleep 3 | |
| fi | |
| eval `cat ~/.ssh/environment-trantor` | |
| ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" \ | |
| hybris@`docker inspect firefox | grep IPAddress | sed 's/.*"\(.*\)",/\1/'` \ | |
| DISPLAY=$DISPLAY PULSE_SERVER=tcp:172.17.42.1 iceweasel $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment