Skip to content

Commit

Permalink
new image setup with core xvfb, vnc functionality
Browse files Browse the repository at this point in the history
generic based on debian/jessie
netscape extends generic, using netscape4
firefox extends generic, using firefox40 w/o selenium
  • Loading branch information
ikreymer committed Sep 14, 2015
1 parent 1da4be1 commit 4c3e90f
Show file tree
Hide file tree
Showing 18 changed files with 228 additions and 675 deletions.
40 changes: 0 additions & 40 deletions app/browser/Dockerfile

This file was deleted.

181 changes: 0 additions & 181 deletions app/browser/app.py

This file was deleted.

5 changes: 0 additions & 5 deletions app/browser/requirements.txt

This file was deleted.

8 changes: 0 additions & 8 deletions app/browser/run.sh

This file was deleted.

27 changes: 27 additions & 0 deletions app/firefox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM memoframe/base-browser

ENV FF_VERSION 40.0.3

RUN apt-get update && apt-get install -y \
libgtk2.0-0 libasound2 libdbus-glib-1-2 libnss3-tools gnome-icon-theme lxappearance
&& rm -rf /var/lib/apt/lists/*

WORKDIR /download

RUN wget https://download-installer.cdn.mozilla.net/pub/firefox/releases/$FF_VERSION/linux-x86_64/en-US/firefox-$FF_VERSION.tar.bz2 && \
tar xvf firefox-$FF_VERSION.tar.bz2
RUN sudo mv ./firefox /opt/firefox

USER browser

#WORKDIR /home/browser/ffprofile

COPY ./ffprofile/. /home/browser/ffprofile/

COPY run.sh /app/run.sh

RUN sudo chmod a+x /app/run.sh

CMD /app/entry_point.sh /app/run.sh


9 changes: 9 additions & 0 deletions app/firefox/ffprofile/user.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
user_pref("network.proxy.http", "memoframe_pywb_1");
user_pref("network.proxy.http_port", 8080);
user_pref("network.proxy.ssl", "memoframe_pywb_1");
user_pref("network.proxy.ssl_port", 8080);
user_pref("network.proxy.type", 1);
user_pref("network.proxy.share_proxy_settings", true);

user_pref("datareporting.healthreport.service.firstRun", false);
user_pref("datareporting.healthreport.uploadEnabled", false);
17 changes: 17 additions & 0 deletions app/firefox/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

#mkdir /home/browser/ffprofile

#sudo mv /download/user.js /home/browser/ffprofile/user.js

sudo chown browser:browser /home/browser/ffprofile

cd /home/browser/ffprofile
sudo chown browser:browser /home/browser/ffprofile/*
chmod 644 /home/browser/ffprofile/*

http_proxy="http://memoframe_pywb_1:8080" wget "http://pywb.proxy/pywb-ca.pem"

certutil -A -n "PYWB" -t "TCu,Cuw,Tuw" -i ./pywb-ca.pem -d /home/browser/ffprofile

/opt/firefox/firefox --profile /home/browser/ffprofile -setDefaultBrowser --new-window "$URL" -width 1320 -height 1020
61 changes: 61 additions & 0 deletions app/generic/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
FROM debian:jessie

ENV TS 1996
ENV URL about:blank

ENV SCREEN_WIDTH 1360
ENV SCREEN_HEIGHT 1020
ENV SCREEN_DEPTH 24
ENV DISPLAY :99

RUN apt-get -y update && \
apt-get -qqy install \
git \
sudo \
python2.7 \
python-pip \
python2.7-dev \
python-openssl \
libssl-dev libffi-dev \
net-tools \
x11vnc \
xvfb \
fluxbox \
wget

RUN apt-get -qqy install \
fonts-ipafont-gothic \
xfonts-100dpi \
xfonts-75dpi \
xfonts-cyrillic \
xfonts-scalable \
xfonts-base \
fonts-arphic-bkai00mp fonts-arphic-bsmi00lp fonts-arphic-gbsn00lp fonts-arphic-gkai00mp fonts-arphic-ukai fonts-farsiweb fonts-nafees fonts-sil-abyssinica fonts-sil-ezra fonts-sil-padauk fonts-unfonts-extra fonts-unfonts-core fonts-indic fonts-thai-tlwg fonts-lklug-sinhala \
&& easy_install --upgrade pip \
&& rm -rf /var/lib/apt/lists/*

RUN sudo useradd browser --shell /bin/bash --create-home \
&& sudo usermod -a -G sudo browser \
&& echo 'ALL ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers \
&& echo 'browser:secret' | chpasswd

WORKDIR /novnc

RUN git clone https://github.com/kanaka/noVNC.git /novnc

RUN git clone https://github.com/kanaka/websockify.git /novnc/utils/websockify

COPY vnc_auto.html /novnc/vnc_auto.html

WORKDIR /app

ADD requirements.txt /app/

RUN pip install -U -r requirements.txt

COPY app.py /app/app.py

ADD entry_point.sh /app/entry_point.sh
RUN chmod a+x /app/entry_point.sh

CMD /app/entry_point.sh
File renamed without changes.
Loading

0 comments on commit 4c3e90f

Please sign in to comment.