Last active
October 10, 2024 23:19
-
-
Save yadutaf/d9336992eb9fb2bdaab4 to your computer and use it in GitHub Desktop.
Run firefox in the cloud. Or inside Firefox.
This file contains 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 ubuntu:14.04 | |
MAINTAINER Jean-Tiare Le Bigot "jt@lebigot.net" | |
ENV DEBIAN_FRONTEND noninteractive | |
# Grab all dependencies | |
RUN apt-get update \ | |
&& apt-get -y upgrade \ | |
&& apt-get -y install curl libx11-dev libxtst-dev libxcomposite-dev \ | |
libxdamage-dev libxkbfile-dev python-all-dev \ | |
python-gobject-dev python-gtk2-dev cython \ | |
xvfb xauth x11-xkb-utils libx264-dev libvpx-dev \ | |
libswscale-dev libavcodec-dev subversion websockify curl | |
# Grab sources, need latest version for HTML5 | |
WORKDIR /usr/src | |
RUN svn co https://www.xpra.org/svn/Xpra/ | |
# Build from sources | |
RUN cd Xpra/trunk/src \ | |
&& python ./setup.py --without-csc_swscale install \ | |
&& cd rencode \ | |
&& python ./setup.py install \ | |
&& curl https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py | sudo python | |
# Get our "demo" executable | |
RUN apt-get -y install firefox | |
# Declare ports. A real application would probably use the only one not listed: SSH | |
# expose HTML5 port (experimental) | |
EXPOSE 8080 | |
# expose raw TCP port | |
EXPOSE 10000 | |
# Create a dedicated user | |
RUN useradd xpra --password '*' --create-home | |
USER xpra | |
ENV HOME /home/xpra | |
# Run! Application will be served both as WebSocket and Raw TCP. (+ disable all unsupported bits) | |
CMD ["xpra", "start", ":10", "--start-child=firefox", "--daemon=off", "--bind-tcp=0.0.0.0:10000", "--html=0.0.0.0:8080", \ | |
"--no-mdns", "--no-notifications", "--no-pulseaudio"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run Firefox in the cloud using Docker and Xpra. Docker is a container isolation technology, Xpra is an efficient remote application server for Linux supporting OpenGL offloading (not shown here) and Firefox is... well, you know it. Tied together, you get real private browsing.
Usage:
More on xpra: http://xpra.org/
Feeling cloudy ? Have a look at http://labs.runabove.com/docker/ and
DISCLAIMER: This Gist is a PoC (Proof of Concept). Try it at home, not in production. You've been warned. There is no security.
LICENSE: MIT
AUTHOR: @oyadutaf (on twitter)