From fb51b2ac4e64a740f4ccd2214aeddde3843da835 Mon Sep 17 00:00:00 2001 From: Keyvan Fatehi Date: Sat, 17 Sep 2022 17:05:47 -0700 Subject: [PATCH] use arm-compatible upstream base image --- Dockerfile | 42 +------------------ rootfs/etc/cont-init.d/check-snd.sh | 2 +- .../cont-init.d/firefox-set-prefs-from-env.sh | 3 +- rootfs/etc/cont-init.d/firefox.sh | 6 ++- rootfs/startapp.sh | 2 +- 5 files changed, 8 insertions(+), 47 deletions(-) diff --git a/Dockerfile b/Dockerfile index 92bd40d..595db4f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ # # Pull base image. -FROM jlesage/baseimage-gui:alpine-3.10-v3.5.3 +FROM jlesage/baseimage-gui:alpine-3.16-v4.0.0-pre.6 # Docker image version is provided via build arg. ARG DOCKER_IMAGE_VERSION=unknown @@ -62,52 +62,12 @@ RUN \ # The following package is used to send key presses to the X process. xdotool -# Set default settings. -# RUN \ -# CFG_FILE="$(ls /usr/lib/firefox/browser/defaults/preferences/firefox-branding.js)" && \ -# echo '' >> "$CFG_FILE" && \ -# echo '// Default download directory.' >> "$CFG_FILE" && \ -# echo 'pref("browser.download.dir", "/config/downloads");' >> "$CFG_FILE" && \ -# echo 'pref("browser.download.folderList", 2);' >> "$CFG_FILE" - -# Install profile-cleaner. -#RUN \ -# add-pkg --virtual build-dependencies curl && \ -# curl -# -L -o /usr/bin/profile-cleaner {$PROFILE_CLEANER_URL} && \ -# sed-patch 's/@VERSION@/'${PROFILE_CLEANER_VERSION}'/' /usr/bin/profile-cleaner && \ -# chmod +x /usr/bin/profile-cleaner && \ -# add-pkg \ -# bash \ -# file \ -# coreutils \ -# bc \ -# parallel \ -# sqlite \ -# && \ -# # Cleanup. -# del-pkg build-dependencies && \ -# rm -rf /tmp/* /tmp/.[!.]* - # Enable log monitoring. RUN \ add-pkg yad && \ sed-patch 's|LOG_FILES=|LOG_FILES=/config/log/chromium/error.log|' /etc/logmonitor/logmonitor.conf && \ sed-patch 's|STATUS_FILES=|STATUS_FILES=/tmp/.chromium_shm_check|' /etc/logmonitor/logmonitor.conf -# Adjust the openbox config. -RUN \ - # Maximize only the main window. - sed-patch 's///' \ - /etc/xdg/openbox/rc.xml && \ - # Make sure the main window is always in the background. - sed-patch '//a \ below' \ - /etc/xdg/openbox/rc.xml - -# Generate and install favicons. -RUN \ - APP_ICON_URL=https://www.chromium.org/_/rsrc/1438879449147/config/customLogo.gif && \ - install_app_icon.sh "$APP_ICON_URL" - # Add files. COPY rootfs/ / diff --git a/rootfs/etc/cont-init.d/check-snd.sh b/rootfs/etc/cont-init.d/check-snd.sh index dcbdfb1..8739324 100755 --- a/rootfs/etc/cont-init.d/check-snd.sh +++ b/rootfs/etc/cont-init.d/check-snd.sh @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv sh +#!/bin/sh set -e # Exit immediately if a command exits with a non-zero status. set -u # Treat unset variables as an error. diff --git a/rootfs/etc/cont-init.d/firefox-set-prefs-from-env.sh b/rootfs/etc/cont-init.d/firefox-set-prefs-from-env.sh index 2898de2..1ae7544 100755 --- a/rootfs/etc/cont-init.d/firefox-set-prefs-from-env.sh +++ b/rootfs/etc/cont-init.d/firefox-set-prefs-from-env.sh @@ -1,5 +1,4 @@ -#!/usr/bin/with-contenv sh - +#!/bin/sh set -e log() { diff --git a/rootfs/etc/cont-init.d/firefox.sh b/rootfs/etc/cont-init.d/firefox.sh index cc7230c..d3ab634 100755 --- a/rootfs/etc/cont-init.d/firefox.sh +++ b/rootfs/etc/cont-init.d/firefox.sh @@ -1,5 +1,4 @@ -#!/usr/bin/with-contenv sh - +#!/bin/sh set -e # Exit immediately if a command exits with a non-zero status. set -u # Treat unset variables as an error. @@ -63,4 +62,7 @@ done # Take ownership of the config directory content. find /config -mindepth 1 -exec chown $USER_ID:$GROUP_ID {} \; +# Unlock the profile (may be left over previously. Will cause trouble if trying to use same profile in parallel so don't do that.) +rm -rf /config/profile/Singleton* + # vim: set ft=sh : diff --git a/rootfs/startapp.sh b/rootfs/startapp.sh index f11e229..06a4e22 100755 --- a/rootfs/startapp.sh +++ b/rootfs/startapp.sh @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv sh +#!/bin/sh set -e # Exit immediately if a command exits with a non-zero status. set -u # Treat unset variables as an error.