From 9f1d7624a612b7c863913d2e01c3452a4c0d7f91 Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Mon, 7 Dec 2015 07:05:15 +0000 Subject: [PATCH] chromium: refactor into base-chromium, child chromium5 and chromium10 images --- browsers/base-chromium/Dockerfile | 22 +++++++++++++++ browsers/{chromium10 => base-chromium}/jwmrc | 0 browsers/{chromium10 => base-chromium}/run.sh | 0 browsers/chromium10/Dockerfile | 24 +++------------- browsers/chromium5/Dockerfile | 24 +++------------- browsers/chromium5/jwmrc | 28 ------------------- browsers/chromium5/run.sh | 23 --------------- 7 files changed, 30 insertions(+), 91 deletions(-) create mode 100644 browsers/base-chromium/Dockerfile rename browsers/{chromium10 => base-chromium}/jwmrc (100%) rename browsers/{chromium10 => base-chromium}/run.sh (100%) delete mode 100644 browsers/chromium5/jwmrc delete mode 100644 browsers/chromium5/run.sh diff --git a/browsers/base-chromium/Dockerfile b/browsers/base-chromium/Dockerfile new file mode 100644 index 0000000..e405224 --- /dev/null +++ b/browsers/base-chromium/Dockerfile @@ -0,0 +1,22 @@ +FROM netcapsule/base-browser + +RUN apt-get update && apt-get install -y libpango1.0-0 libfreetype6 libnss3-1d libnspr4-0d libasound2 libgconf-2-4 libgtk2.0-0 libnss3-tools jwm zip \ + && rm -rf /var/lib/apt/lists/* + +# install old libgcrypt +RUN echo "deb http://ftp.de.debian.org/debian wheezy main" >> /etc/apt/sources.list \ + && apt-get update \ + && apt-get install -y libgcrypt11 + +USER browser + +WORKDIR /home/browser + +COPY jwmrc /home/browser/.jwmrc + +COPY run.sh /app/run.sh + +RUN sudo chmod a+x /app/run.sh + +CMD /app/entry_point.sh /app/run.sh + diff --git a/browsers/chromium10/jwmrc b/browsers/base-chromium/jwmrc similarity index 100% rename from browsers/chromium10/jwmrc rename to browsers/base-chromium/jwmrc diff --git a/browsers/chromium10/run.sh b/browsers/base-chromium/run.sh similarity index 100% rename from browsers/chromium10/run.sh rename to browsers/base-chromium/run.sh diff --git a/browsers/chromium10/Dockerfile b/browsers/chromium10/Dockerfile index 3620d43..10d8548 100644 --- a/browsers/chromium10/Dockerfile +++ b/browsers/chromium10/Dockerfile @@ -1,28 +1,12 @@ -FROM netcapsule/base-browser +FROM netcapsule/base-chromium # To get a different version, use "Position Lookup" here: [https://omahaproxy.appspot.com] to find the position code for that version string, # then look for that postition code here: [https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_x64/]. # If it exists, use [https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64//chrome-linux.zip]. # See also [http://www.chromium.org/getting-involved/download-chromium]. -RUN apt-get update && apt-get install -y libpango1.0-0 libfreetype6 libnss3-1d libnspr4-0d libasound2 libgconf-2-4 libgtk2.0-0 libnss3-tools jwm zip \ - && rm -rf /var/lib/apt/lists/* \ - && wget -q https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/72316/chrome-linux.zip \ - && unzip chrome-linux.zip -d /home/browser +ENV POSITION_CODE 72316 -# install old libgcrypt -RUN echo "deb http://ftp.de.debian.org/debian wheezy main" >> /etc/apt/sources.list \ - && apt-get update \ - && apt-get install -y libgcrypt11 +RUN wget -q https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/${POSITION_CODE}/chrome-linux.zip;\ + unzip chrome-linux.zip -d /home/browser -USER browser - -COPY jwmrc /home/browser/.jwmrc - -COPY run.sh /app/run.sh - -RUN sudo chmod a+x /app/run.sh - -WORKDIR /home/browser - -CMD /app/entry_point.sh /app/run.sh diff --git a/browsers/chromium5/Dockerfile b/browsers/chromium5/Dockerfile index 22345f5..eed8c62 100644 --- a/browsers/chromium5/Dockerfile +++ b/browsers/chromium5/Dockerfile @@ -1,28 +1,12 @@ -FROM netcapsule/base-browser +FROM netcapsule/base-chromium # To get a different version, use "Position Lookup" here: [https://omahaproxy.appspot.com] to find the position code for that version string, # then look for that postition code here: [https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_x64/]. # If it exists, use [https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64//chrome-linux.zip]. # See also [http://www.chromium.org/getting-involved/download-chromium]. -RUN apt-get update && apt-get install -y libpango1.0-0 libfreetype6 libnss3-1d libnspr4-0d libasound2 libgconf-2-4 libgtk2.0-0 libnss3-tools jwm zip \ - && rm -rf /var/lib/apt/lists/* \ - && wget -q https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/44202/chrome-linux.zip \ - && unzip chrome-linux.zip -d /home/browser +ENV POSITION_CODE 44202 -# install old libgcrypt -RUN echo "deb http://ftp.de.debian.org/debian wheezy main" >> /etc/apt/sources.list \ - && apt-get update \ - && apt-get install -y libgcrypt11 +RUN wget -q https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/${POSITION_CODE}/chrome-linux.zip;\ + unzip chrome-linux.zip -d /home/browser -USER browser - -COPY jwmrc /home/browser/.jwmrc - -COPY run.sh /app/run.sh - -RUN sudo chmod a+x /app/run.sh - -WORKDIR /home/browser - -CMD /app/entry_point.sh /app/run.sh diff --git a/browsers/chromium5/jwmrc b/browsers/chromium5/jwmrc deleted file mode 100644 index 24b0236..0000000 --- a/browsers/chromium5/jwmrc +++ /dev/null @@ -1,28 +0,0 @@ - - - - .* - - - - - -*-fixed-*-r-*-*-10-*-*-*-*-*-*-* - 1 - 20 - - - white - gray30:gray60 - black - 1.0 - - - - #aaaaaa - #808488:#303438 - black - 0.5:0.9:0.1 - - - - diff --git a/browsers/chromium5/run.sh b/browsers/chromium5/run.sh deleted file mode 100644 index 3b58582..0000000 --- a/browsers/chromium5/run.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -#fluxbox -display $DISPLAY -log /tmp/fluxbox.log & -jwm -display $DISPLAY & - -http_proxy="http://netcapsule_pywb_1:8080" wget "http://pywb.proxy/pywb-ca.pem" - -mkdir -p $HOME/.pki/nssdb -certutil -d $HOME/.pki/nssdb -N -certutil -d sql:$HOME/.pki/nssdb -A -t "C,," -n "pywb" -i ~/pywb-ca.pem - -sudo chown -R browser:browser ~/chrome-linux - -mkdir ~/.config/ -mkdir ~/.config/chromium -touch ~/.config/chromium/First\ Run - -if [ -n "$NO_PROXY" ]; then - run_browser ~/chrome-linux/chrome "$URL" -else - run_browser ~/chrome-linux/chrome --proxy-server="netcapsule_pywb_1:8080" "$URL" -fi -