Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 1 addition & 41 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/<application type="normal">/<application type="normal" title="Chromium">/' \
/etc/xdg/openbox/rc.xml && \
# Make sure the main window is always in the background.
sed-patch '/<application type="normal" title="Chromium">/a \ <layer>below</layer>' \
/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/ /

Expand Down
2 changes: 1 addition & 1 deletion rootfs/etc/cont-init.d/check-snd.sh
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 1 addition & 2 deletions rootfs/etc/cont-init.d/firefox-set-prefs-from-env.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/with-contenv sh

#!/bin/sh
set -e

log() {
Expand Down
6 changes: 4 additions & 2 deletions rootfs/etc/cont-init.d/firefox.sh
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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 :
2 changes: 1 addition & 1 deletion rootfs/startapp.sh
Original file line number Diff line number Diff line change
@@ -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.
Expand Down