Adaptations for the new baseimage version 4.

This commit is contained in:
Jocelyn Le Sage 2022-10-07 09:37:43 -04:00
parent 1b36ec0101
commit 32b23d080a
14 changed files with 52 additions and 149 deletions

View file

@ -13,20 +13,18 @@ RUN gcc -static -o membarrier_check membarrier_check.c
RUN strip membarrier_check
# Pull base image.
FROM jlesage/baseimage-gui:alpine-3.15-v3.5.8
FROM jlesage/baseimage-gui:alpine-3.16-v4.0.1
# Docker image version is provided via build arg.
ARG DOCKER_IMAGE_VERSION=unknown
ARG DOCKER_IMAGE_VERSION=
# Define software versions.
ARG FIREFOX_VERSION=94.0-r0
ARG YAD_VERSION=7.3
ARG FIREFOX_VERSION=101.0.1-r0
ARG JSONLZ4_VERSION=c4305b8
ARG LZ4_VERSION=1.8.1.2
#ARG PROFILE_CLEANER_VERSION=2.36
# Define software download URLs.
ARG YAD_URL=https://github.com/v1cont/yad/releases/download/v${YAD_VERSION}/yad-${YAD_VERSION}.tar.xz
ARG JSONLZ4_URL=https://github.com/avih/dejsonlz4/archive/${JSONLZ4_VERSION}.tar.gz
ARG LZ4_URL=https://github.com/lz4/lz4/archive/v${LZ4_VERSION}.tar.gz
#ARG PROFILE_CLEANER_URL=https://github.com/graysky2/profile-cleaner/raw/v${PROFILE_CLEANER_VERSION}/common/profile-cleaner.in
@ -64,49 +62,13 @@ RUN \
# --upgrade firefox=${FIREFOX_VERSION}
add-pkg firefox=${FIREFOX_VERSION}
# Install YAD.
# NOTE: YAD is compiled manually because the version on the Alpine repository
# pulls too much dependencies.
RUN \
# Install packages needed by the build.
add-pkg --virtual build-dependencies \
build-base \
curl \
intltool \
gtk+3.0-dev \
&& \
# Set same default compilation flags as abuild.
export CFLAGS="-Os -fomit-frame-pointer" && \
export CXXFLAGS="$CFLAGS" && \
export CPPFLAGS="$CFLAGS" && \
export LDFLAGS="-Wl,--as-needed" && \
# Download.
mkdir yad && \
echo "Downloading YAD package..." && \
curl -# -L ${YAD_URL} | tar xJ --strip 1 -C yad && \
# Compile.
cd yad && \
./configure \
--prefix=/usr \
--enable-standalone \
--disable-icon-browser \
--disable-html \
--disable-pfd \
&& \
make && make install && \
strip /usr/bin/yad && \
cd .. && \
# Cleanup.
del-pkg build-dependencies && \
rm -rf /tmp/* /tmp/.[!.]*
# Install extra packages.
RUN \
add-pkg \
desktop-file-utils \
adwaita-icon-theme \
# Icons used by folder/file selection window (when saving as).
gnome-icon-theme \
# A font is needed.
ttf-dejavu \
ffmpeg-libs \
# The following package is used to send key presses to the X process.
xdotool
@ -141,15 +103,6 @@ RUN \
sed-patch 's|LOG_FILES=|LOG_FILES=/config/log/firefox/error.log|' /etc/logmonitor/logmonitor.conf && \
sed-patch 's|STATUS_FILES=|STATUS_FILES=/tmp/.firefox_shm_check,/tmp/.firefox_membarrier_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="Mozilla Firefox">/' \
/etc/xdg/openbox/rc.xml && \
# Make sure the main window is always in the background.
sed-patch '/<application type="normal" title="Mozilla Firefox">/a \ <layer>below</layer>' \
/etc/xdg/openbox/rc.xml
# Generate and install favicons.
RUN \
APP_ICON_URL=https://github.com/jlesage/docker-templates/raw/master/jlesage/images/firefox-icon.png && \
@ -159,8 +112,12 @@ RUN \
COPY rootfs/ /
COPY --from=membarrier /tmp/membarrier_check /usr/bin/
# Set environment variables.
ENV APP_NAME="Firefox"
# Set internal environment variables.
RUN \
set-cont-env APP_NAME "Firefox" && \
set-cont-env APP_VERSION "$FIREFOX_VERSION" && \
set-cont-env DOCKER_IMAGE_VERSION "$DOCKER_IMAGE_VERSION" && \
true
# Define mountable directories.
VOLUME ["/config"]
@ -169,6 +126,6 @@ VOLUME ["/config"]
LABEL \
org.label-schema.name="firefox" \
org.label-schema.description="Docker container for Firefox" \
org.label-schema.version="$DOCKER_IMAGE_VERSION" \
org.label-schema.version="${DOCKER_IMAGE_VERSION:-unknown}" \
org.label-schema.vcs-url="https://github.com/jlesage/docker-firefox" \
org.label-schema.schema-version="1.0"