From 208735a305e17e5076b03fdb09b68bc627e9ad0f Mon Sep 17 00:00:00 2001 From: mbattista Date: Sat, 3 Apr 2021 12:10:42 +0100 Subject: [PATCH] ARM container do need their own Dockerfile --- .m1k1o/build | 2 +- .m1k1o/chromium/Dockerfile | 6 +++--- .m1k1o/chromium/DockerfileARM | 19 +++++++++++++++++++ .m1k1o/chromium/supervisord.conf | 2 +- .m1k1o/firefox/DockerfileARM | 24 ++++++++++++++++++++++++ 5 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 .m1k1o/chromium/DockerfileARM create mode 100644 .m1k1o/firefox/DockerfileARM diff --git a/.m1k1o/build b/.m1k1o/build index 70f1a00..ec5a987 100755 --- a/.m1k1o/build +++ b/.m1k1o/build @@ -55,7 +55,7 @@ build_arm() { docker build -t "${BUILD_IMAGE}:arm-base" -f arm-base/Dockerfile "${BASE}" else # buld ARM image - docker build -t "${BUILD_IMAGE}:arm-$1" --build-arg="BASE_IMAGE=${BUILD_IMAGE}:arm-base" -f "$1/Dockerfile" "$1/" + docker build -t "${BUILD_IMAGE}:arm-$1" --build-arg="BASE_IMAGE=${BUILD_IMAGE}:arm-base" -f "$1/DockerfileARM" "$1/" fi } diff --git a/.m1k1o/chromium/Dockerfile b/.m1k1o/chromium/Dockerfile index a6e7d62..5a1dd1b 100644 --- a/.m1k1o/chromium/Dockerfile +++ b/.m1k1o/chromium/Dockerfile @@ -4,13 +4,13 @@ FROM $BASE_IMAGE # # install neko chromium RUN set -eux; apt-get update; \ - apt-get install -y --no-install-recommends unzip chromium openbox; \ + apt-get install -y --no-install-recommends unzip chromium-browser openbox; \ # # install widevine module WIDEVINE_VERSION=$(wget --quiet -O - https://dl.google.com/widevine-cdm/versions.txt | tail -n 1); \ wget -O /tmp/widevine.zip "https://dl.google.com/widevine-cdm/$WIDEVINE_VERSION-linux-x64.zip"; \ - unzip -p /tmp/widevine.zip libwidevinecdm.so > /usr/lib/chromium/libwidevinecdm.so; \ - chmod 644 /usr/lib/chromium/libwidevinecdm.so; \ + unzip -p /tmp/widevine.zip libwidevinecdm.so > /usr/lib/chromium-browser/libwidevinecdm.so; \ + chmod 644 /usr/lib/chromium-browser/libwidevinecdm.so; \ rm /tmp/widevine.zip; \ # # clean up diff --git a/.m1k1o/chromium/DockerfileARM b/.m1k1o/chromium/DockerfileARM new file mode 100644 index 0000000..1d23fc6 --- /dev/null +++ b/.m1k1o/chromium/DockerfileARM @@ -0,0 +1,19 @@ +ARG BASE_IMAGE=m1k1o/neko:base +FROM $BASE_IMAGE + +# +# install neko chromium +RUN set -eux; apt-get update; \ + apt-get install -y --no-install-recommends unzip chromium-browser openbox libwidevinecdm0; \ + # + # clean up + apt-get --purge autoremove -y unzip; \ + apt-get clean -y; \ + rm -rf /var/lib/apt/lists/* /var/cache/apt/* + +# +# copy configuation files +COPY supervisord.conf /etc/neko/supervisord/chromium.conf +COPY --chown=neko preferences.json /home/neko/.config/chromium/Default/Preferences +COPY policies.json /etc/chromium/policies/managed/policies.json +COPY openbox.xml /etc/neko/openbox.xml diff --git a/.m1k1o/chromium/supervisord.conf b/.m1k1o/chromium/supervisord.conf index a972017..635fb03 100644 --- a/.m1k1o/chromium/supervisord.conf +++ b/.m1k1o/chromium/supervisord.conf @@ -1,6 +1,6 @@ [program:chromium] environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s" -command=/usr/bin/chromium --window-position=0,0 --display=%(ENV_DISPLAY)s --user-data-dir=/home/neko/.config/chromium --no-first-run --start-maximized --bwsi --force-dark-mode --disable-file-system --disable-gpu --disable-software-rasterizer --disable-dev-shm-usage +command=/usr/bin/chromium-browser --window-position=0,0 --display=%(ENV_DISPLAY)s --user-data-dir=/home/neko/.config/chromium --no-first-run --start-maximized --bwsi --force-dark-mode --disable-file-system --disable-gpu --disable-software-rasterizer --disable-dev-shm-usage autorestart=true priority=800 user=%(ENV_USER)s diff --git a/.m1k1o/firefox/DockerfileARM b/.m1k1o/firefox/DockerfileARM new file mode 100644 index 0000000..3ea8b72 --- /dev/null +++ b/.m1k1o/firefox/DockerfileARM @@ -0,0 +1,24 @@ +ARG BASE_IMAGE=m1k1o/neko:base +FROM $BASE_IMAGE + +# +# install firefox-esr +RUN set -eux; apt-get update; \ + apt-get install -y --no-install-recommends openbox firefox-esr libwidevinecdm0; \ + # + # install extensions + mkdir -p /usr/lib/firefox-esr/distribution/extensions; \ + wget -O '/usr/lib/firefox-esr/distribution/extensions/uBlock0@raymondhill.net.xpi' https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi; \ + wget -O /usr/lib/firefox-esr/distribution/extensions/nordvpnproxy@nordvpn.com.xpi https://addons.mozilla.org/firefox/downloads/latest/nordvpn-proxy-extension/latest.xpi; \ + # + # clean up + apt-get clean -y; \ + rm -rf /var/lib/apt/lists/* /var/cache/apt/* + +# +# copy configuation files +COPY supervisord.conf /etc/neko/supervisord/firefox.conf +COPY neko.js /usr/lib/firefox-esr/mozilla.cfg +COPY autoconfig.js /usr/lib/firefox-esr/defaults/pref/autoconfig.js +COPY policies.json /usr/lib/firefox-esr/distribution/policies.json +COPY openbox.xml /etc/neko/openbox.xml