Skip to content

Instantly share code, notes, and snippets.

@maurice-audin
Last active July 6, 2018 06:26
Show Gist options
  • Select an option

  • Save maurice-audin/ce429de428e5af3a344a to your computer and use it in GitHub Desktop.

Select an option

Save maurice-audin/ce429de428e5af3a344a to your computer and use it in GitHub Desktop.

Revisions

  1. maurice-audin revised this gist Oct 10, 2014. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -18,6 +18,4 @@ RUN echo "PULSE_SERVER=tcp:172.17.42.1" >> /etc/environment
    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
    # Not maintained, go to https://github.com/hybris42/dockerfiles
  2. maurice-audin revised this gist Oct 8, 2014. 2 changed files with 7 additions and 6 deletions.
    8 changes: 5 additions & 3 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    FROM debian:sid

    # Install
    RUN echo "deb http://http.debian.net/debian sid main contrib" > /etc/apt/sources.list
    RUN echo "deb http://ftp.fr.debian.org/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 adduser ca-certificates iceweasel openssh-server pulseaudio
    RUN apt-get -q install -y flashplugin-nonfree
    RUN mkdir /var/run/sshd
    ADD id_dsa.pub /root/.ssh/authorized_keys
    @@ -12,7 +12,9 @@ ADD id_dsa.pub /root/.ssh/authorized_keys
    RUN adduser --disabled-password --gecos hybris hybris
    ADD id_dsa.pub /home/hybris/.ssh/authorized_keys

    # Launch
    # Prepare env
    RUN echo "DISPLAY=:0.0" >> /etc/environment
    RUN echo "PULSE_SERVER=tcp:172.17.42.1" >> /etc/environment
    CMD /usr/sbin/sshd -D


    5 changes: 2 additions & 3 deletions firefox
    Original file line number Diff line number Diff line change
    @@ -4,14 +4,13 @@
    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 \
    -v /tmp:/tmp \
    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 $@
    iceweasel $@
  3. maurice-audin revised this gist Oct 1, 2014. 2 changed files with 4 additions and 5 deletions.
    5 changes: 1 addition & 4 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,4 @@ CMD /usr/sbin/sshd -D

    # Build with:
    # docker build --no-cache=true -t hybris:firefox .
    # Lauch with:
    # docker run -ti --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
    # Alias firefox to :
    # 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
    # Alias firefox to https://gist.github.com/hybris42/ce429de428e5af3a344a#file-firefox
    4 changes: 3 additions & 1 deletion firefox
    Original file line number Diff line number Diff line change
    @@ -12,4 +12,6 @@ then
    fi

    eval `cat ~/.ssh/environment-trantor`
    /home/hybris/scripts/doc-ssh.sh hybris@firefox DISPLAY=$DISPLAY PULSE_SERVER=tcp:172.17.42.1 iceweasel $@
    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 $@
  4. maurice-audin revised this gist Oct 1, 2014. 1 changed file with 15 additions and 0 deletions.
    15 changes: 15 additions & 0 deletions firefox
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    #! /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`
    /home/hybris/scripts/doc-ssh.sh hybris@firefox DISPLAY=$DISPLAY PULSE_SERVER=tcp:172.17.42.1 iceweasel $@
  5. maurice-audin revised this gist Oct 1, 2014. 1 changed file with 8 additions and 6 deletions.
    14 changes: 8 additions & 6 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -3,20 +3,22 @@ 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
    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
    USER hybris
    ENV HOME /home/hybris
    ENV PULSE_SERVER tcp:172.17.42.1
    ADD id_dsa.pub /home/hybris/.ssh/authorized_keys

    # Launch
    CMD firefox
    CMD /usr/sbin/sshd -D


    # Build with:
    # docker build --no-cache=true -t hybris:firefox .
    # Lauch with:
    # docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/hybris/.mozilla:/home/hybris/.mozilla -v /home/hybris/Downloads:/home/hybris/Downloads hybris:firefox
    # docker run -ti --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
    # Alias firefox to :
    # 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
  6. maurice-audin revised this gist Oct 1, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Dockerfile
    Original file line number Diff line number Diff line change
    @@ -19,4 +19,4 @@ CMD firefox
    # Build with:
    # docker build --no-cache=true -t hybris:firefox .
    # Lauch with:
    # docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/hybris/.mozilla:/home/hybris/.mozilla hybris:firefox
    # docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/hybris/.mozilla:/home/hybris/.mozilla -v /home/hybris/Downloads:/home/hybris/Downloads hybris:firefox
  7. maurice-audin renamed this gist Oct 1, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  8. maurice-audin created this gist Oct 1, 2014.
    22 changes: 22 additions & 0 deletions Dockerfile-firefox
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    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
    RUN apt-get -q install -y flashplugin-nonfree

    # Add user (same name, uid, gid !!)
    RUN adduser --disabled-password --gecos hybris hybris
    USER hybris
    ENV HOME /home/hybris
    ENV PULSE_SERVER tcp:172.17.42.1

    # Launch
    CMD firefox


    # Build with:
    # docker build --no-cache=true -t hybris:firefox .
    # Lauch with:
    # docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/hybris/.mozilla:/home/hybris/.mozilla hybris:firefox