Compare commits

..

3 commits

Author SHA1 Message Date
36db42f89b
Add Docker compose file example 2025-05-18 00:37:30 -04:00
d9fc5df080
Switch to Chromium 2025-05-18 00:36:49 -04:00
e9df645b49
Update metadata 2025-05-18 00:36:19 -04:00
18 changed files with 47 additions and 1683 deletions

12
.github/FUNDING.yml vendored
View file

@ -1,12 +0,0 @@
# These are supported funding model platforms
github: jlesage
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ["https://paypal.me/JocelynLeSage", "https://www.tesla.com/referral/jocelyn4590"]

View file

@ -1,93 +0,0 @@
name: Bug report
description: File a bug report.
title: "[Bug] Provide a short description of the bug here"
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you're experiencing.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: false
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
validations:
required: false
- type: textarea
attributes:
label: Environment
description: |
Provide details about the host running the container.
Examples:
- Operating system (e.g. Ubuntu, Windows, TrueNAS, openmediavault, unRAID, etc).
- Version of the operating system.
- CPU architecture (x86-64, arm, arm64, etc).
- Model of the device, if applicable (e.g. Raspberry Pi 4B, Synology DS418, QNAP TS-364, etc).
- The Docker version (output of `docker version`).
- Anything else specific to your environment. Examples:
- Network share (NFS, CIFS) mapped to the container.
- Docker running in LXC container.
- etc.
- If applicable, how the UI provided by the container is access:
- Browser (Chrome, Firefox, Edge, etc).
- Version of the browser.
- OS of the browser.
- Is the container accessed through a reverse proxy.
- etc.
value: |
- OS:
- OS version:
- CPU:
- Docker version:
- Device model:
- Browser/OS:
validations:
required: false
- type: textarea
attributes:
label: Container creation
description: |
How did you create the container ?
Examples:
- The `docker run` command used.
- The compose file used.
- Screenshots of the management tool UI (e.g. Portainer, unRAID, etc) showing container settings.
validations:
required: true
- type: textarea
attributes:
label: Container log
description: Please copy/paste the output of `docker logs <container name>`.
render: text
validations:
required: true
- type: textarea
attributes:
label: Container inspect
description: |
If the container is running, please provide the output of `docker inspect <container name>`.
**Attention**: If you defined passwords, secrets or any sensitive information via environment variables, make sure to remove them from the output.
render: text
validations:
required: false
- type: textarea
attributes:
label: Anything else?
description: |
Anything that will give more context about the issue you are encountering.
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false

View file

@ -1,8 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question, discuss
url: https://github.com/jlesage/docker-firefox/discussions
about: Get help using this Docker container.
- name: Documentation
url: https://github.com/jlesage/docker-firefox#readme
about: Documentation about this Docker container.

View file

@ -1,16 +0,0 @@
name: Feature request
description: Suggest an idea for this project.
title: "[Feature request] Provide a short description of the feature here"
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thank you for suggesting an idea to make this project better.
- type: textarea
attributes:
label: Idea
description: |
Please describe the desired behavior, pitch your idea, or suggest improvements.
validations:
required: true

View file

@ -1,160 +0,0 @@
name: Docker image CI/CD
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
DOCKER_IMAGE_NAME: jlesage/firefox
PLATFORMS: linux/amd64,linux/386,linux/arm/v7,linux/arm64/v8
on:
push:
branches: '*'
tags:
- v[0-9][0-9].[0-9][0-9].[0-9]+
- v[0-9][0-9].[0-9][0-9].[0-9]+-pre.[0-9]+
pull_request:
jobs:
build:
name: Build image
runs-on: ubuntu-20.04
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: false
- name: Prepare
id: prep
run: |
# Determine the Docker container version.
VERSION=unknown
if [[ $GITHUB_REF =~ refs/tags/* ]]; then
# Git tag pushed: use tag as the version.
VERSION=${GITHUB_REF#refs/tags/}
elif [[ $GITHUB_REF =~ refs/heads/* ]]; then
# Git commit pushed: use the commit SHA as the version.
VERSION=${GITHUB_SHA::8}
elif [[ $GITHUB_REF =~ refs/pull/* ]]; then
# Pull request: use PR number as the version.
VERSION=pr-${{ github.event.number }}
else
echo "::error::Unexpected GITHUB_REF: $GITHUB_REF"
exit 1
fi
# Determine the version to put in container label.
LABEL_VERSION=${VERSION}
if [[ $GITHUB_REF =~ refs/tags/* ]]; then
# Do not include the starting 'v' of the version.
LABEL_VERSION=${VERSION:1}
fi
# Determine the Docker container tags.
TAGS="${{ env.DOCKER_IMAGE_NAME }}:${VERSION}"
if [[ $GITHUB_REF =~ refs/tags/* ]]; then
TAGS="$TAGS,${{ env.DOCKER_IMAGE_NAME }}:latest"
fi
TAGS="$TAGS,$(echo $TAGS | tr ',' '\n' | sed 's|^|ghcr.io/|' | tr '\n' ',')"
# Determine the release type.
if [[ $GITHUB_REF =~ refs/tags/* ]]; then
IS_RELEASE=yes
if [[ $GITHUB_REF =~ -pre\.[0-9]+ ]]; then
RELEASE_TYPE="pre"
else
RELEASE_TYPE="standard"
fi
else
IS_RELEASE=no
RELEASE_TYPE="n/a"
fi
# Print results.
echo "::group::Results"
echo "Github reference: $GITHUB_REF"
echo "Release: $IS_RELEASE"
echo "Release type: $RELEASE_TYPE"
echo "Docker container version: $VERSION"
echo "Docker container version label: $LABEL_VERSION"
echo "Docker container tag(s): $TAGS"
echo "::endgroup::"
# Export outputs.
echo "is_release=${IS_RELEASE}" >> $GITHUB_OUTPUT
echo "release_type=${RELEASE_TYPE}" >> $GITHUB_OUTPUT
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "label_version=${LABEL_VERSION}" >> $GITHUB_OUTPUT
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
#echo "build_date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm,arm64,ppc64le,mips64,s390x
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
if: ${{ steps.prep.outputs.is_release == 'yes' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Login to GitHub Container Registry
if: ${{ steps.prep.outputs.is_release == 'yes' }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: ${{ steps.prep.outputs.is_release == 'yes' }}
provenance: false
platforms: ${{ env.PLATFORMS }}
tags: ${{ steps.prep.outputs.tags }}
build-args: |
DOCKER_IMAGE_VERSION=${{ steps.prep.outputs.label_version }}
cache-from: type=gha,scope=${{ env.DOCKER_IMAGE_NAME }}
cache-to: type=gha,mode=max,scope=${{ env.DOCKER_IMAGE_NAME }}
- name: Inspect
if: ${{ steps.prep.outputs.is_release == 'yes' }}
run: |
docker buildx imagetools inspect ${{ env.DOCKER_IMAGE_NAME }}:${{ steps.prep.outputs.version }}
- name: Checkout
uses: actions/checkout@v4
if: ${{ steps.prep.outputs.release_type == 'standard' }}
- name: Dockerhub description
if: ${{ steps.prep.outputs.release_type == 'standard' }}
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: ${{ env.DOCKER_IMAGE_NAME }}
readme-filepath: DOCKERHUB.md
notification:
name: Notification
needs: [ build ]
runs-on: ubuntu-20.04
if: ${{ always() && github.event_name != 'pull_request' }}
steps:
- name: Pushover notification
uses: desiderati/github-action-pushover@v1
with:
job-status: ${{ needs.build.result }}
pushover-api-token: ${{ secrets.PUSHOVER_API_TOKEN }}
pushover-user-key: ${{ secrets.PUSHOVER_USER_KEY }}

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
config/

View file

@ -1,56 +0,0 @@
# Docker container for Firefox
[![Release](https://img.shields.io/github/release/jlesage/docker-firefox.svg?logo=github&style=for-the-badge)](https://github.com/jlesage/docker-firefox/releases/latest)
[![Docker Image Size](https://img.shields.io/docker/image-size/jlesage/firefox/latest?logo=docker&style=for-the-badge)](https://hub.docker.com/r/jlesage/firefox/tags)
[![Docker Pulls](https://img.shields.io/docker/pulls/jlesage/firefox?label=Pulls&logo=docker&style=for-the-badge)](https://hub.docker.com/r/jlesage/firefox)
[![Docker Stars](https://img.shields.io/docker/stars/jlesage/firefox?label=Stars&logo=docker&style=for-the-badge)](https://hub.docker.com/r/jlesage/firefox)
[![Build Status](https://img.shields.io/github/actions/workflow/status/jlesage/docker-firefox/build-image.yml?logo=github&branch=master&style=for-the-badge)](https://github.com/jlesage/docker-firefox/actions/workflows/build-image.yml)
[![Source](https://img.shields.io/badge/Source-GitHub-blue?logo=github&style=for-the-badge)](https://github.com/jlesage/docker-firefox)
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg?style=for-the-badge)](https://paypal.me/JocelynLeSage)
This is a Docker container for [Firefox](https://www.mozilla.org/firefox/).
The GUI of the application is accessed through a modern web browser (no
installation or configuration needed on the client side) or via any VNC client.
---
[![Firefox logo](https://images.weserv.nl/?url=raw.githubusercontent.com/jlesage/docker-templates/master/jlesage/images/firefox-icon.png&w=110)](https://www.mozilla.org/firefox/)[![Firefox](https://images.placeholders.dev/?width=224&height=110&fontFamily=monospace&fontWeight=400&fontSize=52&text=Firefox&bgColor=rgba(0,0,0,0.0)&textColor=rgba(121,121,121,1))](https://www.mozilla.org/firefox/)
Mozilla Firefox is a free and open-source web browser developed by Mozilla
Foundation and its subsidiary, Mozilla Corporation.
---
## Quick Start
**NOTE**:
The Docker command provided in this quick start is given as an example
and parameters should be adjusted to your need.
Launch the Firefox docker container with the following command:
```shell
docker run -d \
--name=firefox \
-p 5800:5800 \
-v /docker/appdata/firefox:/config:rw \
jlesage/firefox
```
Where:
- `/docker/appdata/firefox`: This is where the application stores its configuration, states, log and any files needing persistency.
Browse to `http://your-host-ip:5800` to access the Firefox GUI.
## Documentation
Full documentation is available at https://github.com/jlesage/docker-firefox.
## Support or Contact
Having troubles with the container or have questions? Please
[create a new issue].
For other great Dockerized applications, see https://jlesage.github.io/docker-apps.
[create a new issue]: https://github.com/jlesage/docker-firefox/issues

View file

@ -1,7 +1,7 @@
# #
# firefox Dockerfile # Chromium Dockerfile
# #
# https://github.com/jlesage/docker-firefox # https://git.mmbradley.ca/MichaelBradley/docker-chromium
# #
# Build the membarrier check tool. # Build the membarrier check tool.
@ -16,24 +16,20 @@ RUN strip membarrier_check
FROM jlesage/baseimage-gui:alpine-3.21-v4.7.1 FROM jlesage/baseimage-gui:alpine-3.21-v4.7.1
# Docker image version is provided via build arg. # Docker image version is provided via build arg.
ARG DOCKER_IMAGE_VERSION= ARG DOCKER_IMAGE_VERSION=v0.1.0
# Define software versions. # Define software versions.
ARG FIREFOX_VERSION=136.0.4-r0 ARG CHROMIUM_VERSION=136.0.7103.113-r0
#ARG PROFILE_CLEANER_VERSION=2.36
# Define software download URLs.
#ARG PROFILE_CLEANER_URL=https://github.com/graysky2/profile-cleaner/raw/v${PROFILE_CLEANER_VERSION}/common/profile-cleaner.in
# Define working directory. # Define working directory.
WORKDIR /tmp WORKDIR /tmp
# Install Firefox. # Install Chromium.
RUN \ RUN \
# add-pkg --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \ # add-pkg --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \
# --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \ # --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \
# --upgrade firefox=${FIREFOX_VERSION} # --upgrade chromium=${CHROMIUM_VERSION}
add-pkg firefox=${FIREFOX_VERSION} add-pkg chromium=${CHROMIUM_VERSION}
# Install extra packages. # Install extra packages.
RUN \ RUN \
@ -47,34 +43,7 @@ RUN \
# A font is needed. # A font is needed.
font-dejavu \ font-dejavu \
# The following package is used to send key presses to the X process. # The following package is used to send key presses to the X process.
xdotool \ xdotool
&& \
# Remove unneeded icons.
find /usr/share/icons/Adwaita -type d -mindepth 1 -maxdepth 1 -not -name 16x16 -not -name scalable -exec rm -rf {} ';' && \
true
# 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/.[!.]*
# Generate and install favicons.
RUN \
APP_ICON_URL=https://github.com/jlesage/docker-templates/raw/master/jlesage/images/firefox-icon.png && \
install_app_icon.sh "$APP_ICON_URL"
# Add files. # Add files.
COPY rootfs/ / COPY rootfs/ /
@ -82,21 +51,15 @@ COPY --from=membarrier /tmp/membarrier_check /usr/bin/
# Set internal environment variables. # Set internal environment variables.
RUN \ RUN \
set-cont-env APP_NAME "Firefox" && \ set-cont-env APP_NAME "Chromium" && \
set-cont-env APP_VERSION "$FIREFOX_VERSION" && \ set-cont-env APP_VERSION "$CHROMIUM_VERSION" && \
set-cont-env DOCKER_IMAGE_VERSION "$DOCKER_IMAGE_VERSION" && \ set-cont-env DOCKER_IMAGE_VERSION "$DOCKER_IMAGE_VERSION" && \
true true
# Set public environment variables.
ENV \
FF_OPEN_URL= \
FF_KIOSK=0 \
FF_CUSTOM_ARGS=
# Metadata. # Metadata.
LABEL \ LABEL \
org.label-schema.name="firefox" \ org.label-schema.name="chromium" \
org.label-schema.description="Docker container for Firefox" \ org.label-schema.description="Docker container for Chromium" \
org.label-schema.version="${DOCKER_IMAGE_VERSION:-unknown}" \ org.label-schema.version="${DOCKER_IMAGE_VERSION:-unknown}" \
org.label-schema.vcs-url="https://github.com/jlesage/docker-firefox" \ org.label-schema.vcs-url="https://git.mmbradley.ca/MichaelBradley/docker-chromium" \
org.label-schema.schema-version="1.0" org.label-schema.schema-version="1.0"

693
README.md
View file

@ -1,692 +1,3 @@
# Docker container for Firefox # Docker container for Chromium
[![Release](https://img.shields.io/github/release/jlesage/docker-firefox.svg?logo=github&style=for-the-badge)](https://github.com/jlesage/docker-firefox/releases/latest)
[![Docker Image Size](https://img.shields.io/docker/image-size/jlesage/firefox/latest?logo=docker&style=for-the-badge)](https://hub.docker.com/r/jlesage/firefox/tags)
[![Docker Pulls](https://img.shields.io/docker/pulls/jlesage/firefox?label=Pulls&logo=docker&style=for-the-badge)](https://hub.docker.com/r/jlesage/firefox)
[![Docker Stars](https://img.shields.io/docker/stars/jlesage/firefox?label=Stars&logo=docker&style=for-the-badge)](https://hub.docker.com/r/jlesage/firefox)
[![Build Status](https://img.shields.io/github/actions/workflow/status/jlesage/docker-firefox/build-image.yml?logo=github&branch=master&style=for-the-badge)](https://github.com/jlesage/docker-firefox/actions/workflows/build-image.yml)
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg?style=for-the-badge)](https://paypal.me/JocelynLeSage)
This project implements a Docker container for [Firefox](https://www.mozilla.org/firefox/). Based off of [jlesage/docker-firefox](https://github.com/jlesage/docker-firefox/)
The GUI of the application is accessed through a modern web browser (no
installation or configuration needed on the client side) or via any VNC client.
---
[![Firefox logo](https://images.weserv.nl/?url=raw.githubusercontent.com/jlesage/docker-templates/master/jlesage/images/firefox-icon.png&w=110)](https://www.mozilla.org/firefox/)[![Firefox](https://images.placeholders.dev/?width=224&height=110&fontFamily=monospace&fontWeight=400&fontSize=52&text=Firefox&bgColor=rgba(0,0,0,0.0)&textColor=rgba(121,121,121,1))](https://www.mozilla.org/firefox/)
Mozilla Firefox is a free and open-source web browser developed by Mozilla
Foundation and its subsidiary, Mozilla Corporation.
---
## Table of Content
* [Quick Start](#quick-start)
* [Usage](#usage)
* [Environment Variables](#environment-variables)
* [Deployment Considerations](#deployment-considerations)
* [Data Volumes](#data-volumes)
* [Ports](#ports)
* [Changing Parameters of a Running Container](#changing-parameters-of-a-running-container)
* [Docker Compose File](#docker-compose-file)
* [Docker Image Versioning](#docker-image-versioning)
* [Docker Image Update](#docker-image-update)
* [Synology](#synology)
* [unRAID](#unraid)
* [User/Group IDs](#usergroup-ids)
* [Accessing the GUI](#accessing-the-gui)
* [Security](#security)
* [SSVNC](#ssvnc)
* [Certificates](#certificates)
* [VNC Password](#vnc-password)
* [Web Authentication](#web-authentication)
* [Configuring Users Credentials](#configuring-users-credentials)
* [Reverse Proxy](#reverse-proxy)
* [Routing Based on Hostname](#routing-based-on-hostname)
* [Routing Based on URL Path](#routing-based-on-url-path)
* [Shell Access](#shell-access)
* [Allowing the membarrier System Call](#allowing-the-membarrier-system-call)
* [Sound Support](#sound-support)
* [Setting Firefox Preferences Via Environment Variables](#setting-firefox-preferences-via-environment-variables)
* [Troubleshooting](#troubleshooting)
* [Crashes](#crashes)
* [Support or Contact](#support-or-contact)
## Quick Start
> [!IMPORTANT]
> The Docker command provided in this quick start is given as an example and
> parameters should be adjusted to your need.
Launch the Firefox docker container with the following command:
```shell
docker run -d \
--name=firefox \
-p 5800:5800 \
-v /docker/appdata/firefox:/config:rw \
jlesage/firefox
```
Where:
- `/docker/appdata/firefox`: This is where the application stores its configuration, states, log and any files needing persistency.
Browse to `http://your-host-ip:5800` to access the Firefox GUI.
## Usage
```shell
docker run [-d] \
--name=firefox \
[-e <VARIABLE_NAME>=<VALUE>]... \
[-v <HOST_DIR>:<CONTAINER_DIR>[:PERMISSIONS]]... \
[-p <HOST_PORT>:<CONTAINER_PORT>]... \
jlesage/firefox
```
| Parameter | Description |
|-----------|-------------|
| -d | Run the container in the background. If not set, the container runs in the foreground. |
| -e | Pass an environment variable to the container. See the [Environment Variables](#environment-variables) section for more details. |
| -v | Set a volume mapping (allows to share a folder/file between the host and the container). See the [Data Volumes](#data-volumes) section for more details. |
| -p | Set a network port mapping (exposes an internal container port to the host). See the [Ports](#ports) section for more details. |
### Environment Variables
To customize some properties of the container, the following environment
variables can be passed via the `-e` parameter (one for each variable). Value
of this parameter has the format `<VARIABLE_NAME>=<VALUE>`.
| Variable | Description | Default |
|----------------|----------------------------------------------|---------|
|`USER_ID`| ID of the user the application runs as. See [User/Group IDs](#usergroup-ids) to better understand when this should be set. | `1000` |
|`GROUP_ID`| ID of the group the application runs as. See [User/Group IDs](#usergroup-ids) to better understand when this should be set. | `1000` |
|`SUP_GROUP_IDS`| Comma-separated list of supplementary group IDs of the application. | (no value) |
|`UMASK`| Mask that controls how permissions are set for newly created files and folders. The value of the mask is in octal notation. By default, the default umask value is `0022`, meaning that newly created files and folders are readable by everyone, but only writable by the owner. See the online umask calculator at http://wintelguy.com/umask-calc.pl. | `0022` |
|`LANG`| Set the [locale](https://en.wikipedia.org/wiki/Locale_(computer_software)), which defines the application's language, **if supported**. Format of the locale is `language[_territory][.codeset]`, where language is an [ISO 639 language code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes), territory is an [ISO 3166 country code](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) and codeset is a character set, like `UTF-8`. For example, Australian English using the UTF-8 encoding is `en_AU.UTF-8`. | `en_US.UTF-8` |
|`TZ`| [TimeZone](http://en.wikipedia.org/wiki/List_of_tz_database_time_zones) used by the container. Timezone can also be set by mapping `/etc/localtime` between the host and the container. | `Etc/UTC` |
|`KEEP_APP_RUNNING`| When set to `1`, the application will be automatically restarted when it crashes or terminates. | `0` |
|`APP_NICENESS`| Priority at which the application should run. A niceness value of -20 is the highest priority and 19 is the lowest priority. The default niceness value is 0. **NOTE**: A negative niceness (priority increase) requires additional permissions. In this case, the container should be run with the docker option `--cap-add=SYS_NICE`. | `0` |
|`INSTALL_PACKAGES`| Space-separated list of packages to install during the startup of the container. List of available packages can be found at https://pkgs.alpinelinux.org. **ATTENTION**: Container functionality can be affected when installing a package that overrides existing container files (e.g. binaries). | (no value) |
|`PACKAGES_MIRROR`| Mirror of the repository to use when installing packages. List of mirrors is available at https://mirrors.alpinelinux.org. | (no value) |
|`CONTAINER_DEBUG`| Set to `1` to enable debug logging. | `0` |
|`DISPLAY_WIDTH`| Width (in pixels) of the application's window. | `1920` |
|`DISPLAY_HEIGHT`| Height (in pixels) of the application's window. | `1080` |
|`DARK_MODE`| When set to `1`, dark mode is enabled for the application. | `0` |
|`WEB_AUDIO`| When set to `1`, audio support is enabled, meaning that any audio produced by the application is played through the browser. Note that audio is not supported for VNC clients. | `0` |
|`WEB_AUTHENTICATION`| When set to `1`, the application's GUI is protected via a login page when accessed via a web browser. Access is allowed only when providing valid credentials. **NOTE**: This feature requires secure connection (`SECURE_CONNECTION` environment variable) to be enabled. | `0` |
|`WEB_AUTHENTICATION_TOKEN_VALIDITY_TIME`| The lifetime of a token, in hours. A token is attributed to the user after a successful login. As long as the token is valid, user can access the application's GUI without having to log in again. Once the token expires, the login page is prompted again. | `24` |
|`WEB_AUTHENTICATION_USERNAME`| Optional username to configure for the web authentication. This is a quick and easy way to configure credentials for a single user. To configure credentials in a more secure way, or to add more users, see the [Web Authentication](#web-authentication) section. | (no value) |
|`WEB_AUTHENTICATION_PASSWORD`| Optional password to configure for the web authentication. This is a quick and easy way to configure credentials for a single user. To configure credentials in a more secure way, or to add more users, see the [Web Authentication](#web-authentication) section. | (no value) |
|`SECURE_CONNECTION`| When set to `1`, an encrypted connection is used to access the application's GUI (either via a web browser or VNC client). See the [Security](#security) section for more details. | `0` |
|`SECURE_CONNECTION_VNC_METHOD`| Method used to perform the secure VNC connection. Possible values are `SSL` or `TLS`. See the [Security](#security) section for more details. | `SSL` |
|`SECURE_CONNECTION_CERTS_CHECK_INTERVAL`| Interval, in seconds, at which the system verifies if web or VNC certificates have changed. When a change is detected, the affected services are automatically restarted. A value of `0` disables the check. | `60` |
|`WEB_LISTENING_PORT`| Port used by the web server to serve the UI of the application. This port is used internally by the container and it is usually not required to be changed. By default, a container is created with the default bridge network, meaning that, to be accessible, each internal container port must be mapped to an external port (using the `-p` or `--publish` argument). However, if the container is created with another network type, changing the port used by the container might be useful to prevent conflict with other services/containers. **NOTE**: a value of `-1` disables listening, meaning that the application's UI won't be accessible over HTTP/HTTPs. | `5800` |
|`VNC_LISTENING_PORT`| Port used by the VNC server to serve the UI of the application. This port is used internally by the container and it is usually not required to be changed. By default, a container is created with the default bridge network, meaning that, to be accessible, each internal container port must be mapped to an external port (using the `-p` or `--publish` argument). However, if the container is created with another network type, changing the port used by the container might be useful to prevent conflict with other services/containers. **NOTE**: a value of `-1` disables listening, meaning that the application's UI won't be accessible over VNC. | `5900` |
|`VNC_PASSWORD`| Password needed to connect to the application's GUI. See the [VNC Password](#vnc-password) section for more details. | (no value) |
|`ENABLE_CJK_FONT`| When set to `1`, open-source computer font `WenQuanYi Zen Hei` is installed. This font contains a large range of Chinese/Japanese/Korean characters. | `0` |
|`FF_OPEN_URL`| The URL to open when Firefox starts. | (no value) |
|`FF_KIOSK`| Set to `1` to enable kiosk mode. This mode launches Firefox in a very restricted and limited mode best suitable for public areas or customer-facing displays. | `0` |
|`FF_CUSTOM_ARGS`| Custom argument(s) to pass when launching Firefox. | `0` |
#### Deployment Considerations
Many tools used to manage Docker containers extract environment variables
defined by the Docker image and use them to create/deploy the container. For
example, this is done by:
- The Docker application on Synology NAS
- The Container Station on QNAP NAS
- Portainer
- etc.
While this can be useful for the user to adjust the value of environment
variables to fit its needs, it can also be confusing and dangerous to keep all
of them.
A good practice is to set/keep only the variables that are needed for the
container to behave as desired in a specific setup. If the value of variable is
kept to its default value, it means that it can be removed. Keep in mind that
all variables are optional, meaning that none of them is required for the
container to start.
Removing environment variables that are not needed provides some advantages:
- Prevents keeping variables that are no longer used by the container. Over
time, with image updates, some variables might be removed.
- Allows the Docker image to change/fix a default value. Again, with image
updates, the default value of a variable might be changed to fix an issue,
or to better support a new feature.
- Prevents changes to a variable that might affect the correct function of
the container. Some undocumented variables, like `PATH` or `ENV`, are
required to be exposed, but are not meant to be changed by users. However,
container management tools still show these variables to users.
- There is a bug with the Container Station on QNAP and the Docker application
on Synology, where an environment variable without value might not be
allowed. This behavior is wrong: it's absolutely fine to have a variable
without value. In fact, this container does have variables without value by
default. Thus, removing unneeded variables is a good way to prevent
deployment issue on these devices.
### Data Volumes
The following table describes data volumes used by the container. The mappings
are set via the `-v` parameter. Each mapping is specified with the following
format: `<HOST_DIR>:<CONTAINER_DIR>[:PERMISSIONS]`.
| Container path | Permissions | Description |
|-----------------|-------------|-------------|
|`/config`| rw | This is where the application stores its configuration, states, log and any files needing persistency. |
### Ports
Here is the list of ports used by the container.
When using the default bridge network, ports can be mapped to the host via the
`-p` parameter (one per port mapping). Each mapping is defined with the
following format: `<HOST_PORT>:<CONTAINER_PORT>`. The port number used inside
the container might not be changeable, but you are free to use any port on the
host side.
See the [Docker Container Networking](https://docs.docker.com/config/containers/container-networking)
documentation for more details.
| Port | Protocol | Mapping to host | Description |
|------|----------|-----------------|-------------|
| 5800 | TCP | Optional | Port to access the application's GUI via the web interface. Mapping to the host is optional if access through the web interface is not wanted. For a container not using the default bridge network, the port can be changed with the `WEB_LISTENING_PORT` environment variable. |
| 5900 | TCP | Optional | Port to access the application's GUI via the VNC protocol. Mapping to the host is optional if access through the VNC protocol is not wanted. For a container not using the default bridge network, the port can be changed with the `VNC_LISTENING_PORT` environment variable. |
### Changing Parameters of a Running Container
As can be seen, environment variables, volume and port mappings are all specified
while creating the container.
The following steps describe the method used to add, remove or update
parameter(s) of an existing container. The general idea is to destroy and
re-create the container:
1. Stop the container (if it is running):
```shell
docker stop firefox
```
2. Remove the container:
```shell
docker rm firefox
```
3. Create/start the container using the `docker run` command, by adjusting
parameters as needed.
> [!NOTE]
> Since all application's data is saved under the `/config` container folder,
> destroying and re-creating a container is not a problem: nothing is lost and
> the application comes back with the same state (as long as the mapping of the
> `/config` folder remains the same).
## Docker Compose File
Here is an example of a `docker-compose.yml` file that can be used with
[Docker Compose](https://docs.docker.com/compose/overview/).
Make sure to adjust according to your needs. Note that only mandatory network
ports are part of the example.
```yaml
version: '3'
services:
firefox:
image: jlesage/firefox
ports:
- "5800:5800"
volumes:
- "/docker/appdata/firefox:/config:rw"
```
## Docker Image Versioning
Each release of a Docker image is versioned. Prior to october 2022, the
[semantic versioning](https://semver.org) was used as the versioning scheme.
Since then, versioning scheme changed to
[calendar versioning](https://calver.org). The format used is `YY.MM.SEQUENCE`,
where:
- `YY` is the zero-padded year (relative to year 2000).
- `MM` is the zero-padded month.
- `SEQUENCE` is the incremental release number within the month (first release
is 1, second is 2, etc).
## Docker Image Update
Because features are added, issues are fixed, or simply because a new version
of the containerized application is integrated, the Docker image is regularly
updated. Different methods can be used to update the Docker image.
The system used to run the container may have a built-in way to update
containers. If so, this could be your primary way to update Docker images.
An other way is to have the image be automatically updated with [Watchtower].
Watchtower is a container-based solution for automating Docker image updates.
This is a "set and forget" type of solution: once a new image is available,
Watchtower will seamlessly perform the necessary steps to update the container.
Finally, the Docker image can be manually updated with these steps:
1. Fetch the latest image:
```shell
docker pull jlesage/firefox
```
2. Stop the container:
```shell
docker stop firefox
```
3. Remove the container:
```shell
docker rm firefox
```
4. Create and start the container using the `docker run` command, with the
the same parameters that were used when it was deployed initially.
[Watchtower]: https://github.com/containrrr/watchtower
### Synology
For owners of a Synology NAS, the following steps can be used to update a
container image.
1. Open the *Docker* application.
2. Click on *Registry* in the left pane.
3. In the search bar, type the name of the container (`jlesage/firefox`).
4. Select the image, click *Download* and then choose the `latest` tag.
5. Wait for the download to complete. A notification will appear once done.
6. Click on *Container* in the left pane.
7. Select your Firefox container.
8. Stop it by clicking *Action*->*Stop*.
9. Clear the container by clicking *Action*->*Reset* (or *Action*->*Clear* if
you don't have the latest *Docker* application). This removes the
container while keeping its configuration.
10. Start the container again by clicking *Action*->*Start*. **NOTE**: The
container may temporarily disappear from the list while it is re-created.
### unRAID
For unRAID, a container image can be updated by following these steps:
1. Select the *Docker* tab.
2. Click the *Check for Updates* button at the bottom of the page.
3. Click the *update ready* link of the container to be updated.
## User/Group IDs
When using data volumes (`-v` flags), permissions issues can occur between the
host and the container. For example, the user within the container may not
exist on the host. This could prevent the host from properly accessing files
and folders on the shared volume.
To avoid any problem, you can specify the user the application should run as.
This is done by passing the user ID and group ID to the container via the
`USER_ID` and `GROUP_ID` environment variables.
To find the right IDs to use, issue the following command on the host, with the
user owning the data volume on the host:
id <username>
Which gives an output like this one:
```text
uid=1000(myuser) gid=1000(myuser) groups=1000(myuser),4(adm),24(cdrom),27(sudo),46(plugdev),113(lpadmin)
```
The value of `uid` (user ID) and `gid` (group ID) are the ones that you should
be given the container.
## Accessing the GUI
Assuming that container's ports are mapped to the same host's ports, the
graphical interface of the application can be accessed via:
* A web browser:
```text
http://<HOST IP ADDR>:5800
```
* Any VNC client:
```text
<HOST IP ADDR>:5900
```
## Security
By default, access to the application's GUI is done over an unencrypted
connection (HTTP or VNC).
Secure connection can be enabled via the `SECURE_CONNECTION` environment
variable. See the [Environment Variables](#environment-variables) section for
more details on how to set an environment variable.
When enabled, application's GUI is performed over an HTTPs connection when
accessed with a browser. All HTTP accesses are automatically redirected to
HTTPs.
When using a VNC client, the VNC connection is performed over SSL. Note that
few VNC clients support this method. [SSVNC] is one of them.
[SSVNC]: http://www.karlrunge.com/x11vnc/ssvnc.html
### SSVNC
[SSVNC] is a VNC viewer that adds encryption security to VNC connections.
While the Linux version of [SSVNC] works well, the Windows version has some
issues. At the time of writing, the latest version `1.0.30` is not functional,
as a connection fails with the following error:
```text
ReadExact: Socket error while reading
```
However, for your convenience, an unofficial and working version is provided
here:
https://github.com/jlesage/docker-baseimage-gui/raw/master/tools/ssvnc_windows_only-1.0.30-r1.zip
The only difference with the official package is that the bundled version of
`stunnel` has been upgraded to version `5.49`, which fixes the connection
problems.
### Certificates
Here are the certificate files needed by the container. By default, when they
are missing, self-signed certificates are generated and used. All files have
PEM encoded, x509 certificates.
| Container Path | Purpose | Content |
|---------------------------------|----------------------------|---------|
|`/config/certs/vnc-server.pem` |VNC connection encryption. |VNC server's private key and certificate, bundled with any root and intermediate certificates.|
|`/config/certs/web-privkey.pem` |HTTPs connection encryption.|Web server's private key.|
|`/config/certs/web-fullchain.pem`|HTTPs connection encryption.|Web server's certificate, bundled with any root and intermediate certificates.|
> [!TIP]
> To prevent any certificate validity warnings/errors from the browser or VNC
> client, make sure to supply your own valid certificates.
> [!NOTE]
> Certificate files are monitored and relevant daemons are automatically
> restarted when changes are detected.
### VNC Password
To restrict access to your application, a password can be specified. This can
be done via two methods:
* By using the `VNC_PASSWORD` environment variable.
* By creating a `.vncpass_clear` file at the root of the `/config` volume.
This file should contain the password in clear-text. During the container
startup, content of the file is obfuscated and moved to `.vncpass`.
The level of security provided by the VNC password depends on two things:
* The type of communication channel (encrypted/unencrypted).
* How secure the access to the host is.
When using a VNC password, it is highly desirable to enable the secure
connection to prevent sending the password in clear over an unencrypted channel.
> [!CAUTION]
> Password is limited to 8 characters. This limitation comes from the Remote
> Framebuffer Protocol [RFC](https://tools.ietf.org/html/rfc6143) (see section
> [7.2.2](https://tools.ietf.org/html/rfc6143#section-7.2.2)). Any characters
> beyond the limit are ignored.
### Web Authentication
Access to the application's GUI via a web browser can be protected with a login
page. When web authentication is enabled, users have to provide valid
credentials, otherwise access is denied.
Web authentication can be enabled by setting the `WEB_AUTHENTICATION`
environment variable to `1`.
See the [Environment Variables](#environment-variables) section for more details
on how to set an environment variable.
> [!IMPORTANT]
> Secure connection must also be enabled to use web authentication.
> See the [Security](#security) section for more details.
#### Configuring Users Credentials
Two methods can be used to configure users credentials:
1. Via container environment variables.
2. Via password database.
Containers environment variables can be used to quickly and easily configure
a single user. Username and pasword are defined via the following environment
variables:
- `WEB_AUTHENTICATION_USERNAME`
- `WEB_AUTHENTICATION_PASSWORD`
See the [Environment Variables](#environment-variables) section for more details
on how to set an environment variable.
The second method is more secure and allows multiple users to be configured.
The usernames and password hashes are saved into a password database, located at
`/config/webauth-htpasswd` inside the container. This database file has the
same format as htpasswd files of the Apache HTTP server. Note that password
themselves are not saved into the database, but only their hash. The bcrypt
password hashing function is used to generate hashes.
Users are managed via the `webauth-user` tool included in the container:
- To add a user password: `docker exec -ti <container name or id> webauth-user add <username>`.
- To update a user password: `docker exec -ti <container name or id> webauth-user update <username>`.
- To remove a user: `docker exec <container name or id> webauth-user del <username>`.
- To list users: `docker exec <container name or id> webauth-user user`.
## Reverse Proxy
The following sections contain NGINX configurations that need to be added in
order to reverse proxy to this container.
A reverse proxy server can route HTTP requests based on the hostname or the URL
path.
### Routing Based on Hostname
In this scenario, each hostname is routed to a different application/container.
For example, let's say the reverse proxy server is running on the same machine
as this container. The server would proxy all HTTP requests sent to
`firefox.domain.tld` to the container at `127.0.0.1:5800`.
Here are the relevant configuration elements that would be added to the NGINX
configuration:
```nginx
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream docker-firefox {
# If the reverse proxy server is not running on the same machine as the
# Docker container, use the IP of the Docker host here.
# Make sure to adjust the port according to how port 5800 of the
# container has been mapped on the host.
server 127.0.0.1:5800;
}
server {
[...]
server_name firefox.domain.tld;
location / {
proxy_pass http://docker-firefox;
}
location /websockify {
proxy_pass http://docker-firefox;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 86400;
}
# Needed when audio support is enabled.
location /websockify-audio {
proxy_pass http://docker-firefox;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 86400;
}
}
```
### Routing Based on URL Path
In this scenario, the hostname is the same, but different URL paths are used to
route to different applications/containers.
For example, let's say the reverse proxy server is running on the same machine
as this container. The server would proxy all HTTP requests for
`server.domain.tld/firefox` to the container at `127.0.0.1:5800`.
Here are the relevant configuration elements that would be added to the NGINX
configuration:
```nginx
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream docker-firefox {
# If the reverse proxy server is not running on the same machine as the
# Docker container, use the IP of the Docker host here.
# Make sure to adjust the port according to how port 5800 of the
# container has been mapped on the host.
server 127.0.0.1:5800;
}
server {
[...]
location = /firefox {return 301 $scheme://$http_host/firefox/;}
location /firefox/ {
proxy_pass http://docker-firefox/;
# Uncomment the following line if your Nginx server runs on a port that
# differs from the one seen by external clients.
#port_in_redirect off;
location /firefox/websockify {
proxy_pass http://docker-firefox/websockify/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 86400;
}
}
}
```
## Shell Access
To get shell access to the running container, execute the following command:
```shell
docker exec -ti CONTAINER sh
```
Where `CONTAINER` is the ID or the name of the container used during its
creation.
## Allowing the membarrier System Call
To properly work, recent versions of Firefox need the
`membarrier` system call. Without it, tabs would frequently crash.
Docker uses [seccomp profile] to restrict system calls available to the
container. Before Docker version `20.10.0`, the `membarrier` system call was
not allowed in the default profile. If you run a such version, you can use one
of the following solutions, from the most to the least secure, to provide the
container permission to use this sytem call:
1. Run the container with a custom seccomp profile allowing the `membarrier`
system call. The [latest official seccomp profile] can be used. Download
the file and then add the following parameter when creating the container:
`--security-opt seccomp=/path/to/seccomp_profile.json`.
2. Run the container without the default seccomp profile (thus allowing all
system calls). Use the following parameter when creating the container:
`--security-opt seccomp=unconfined`.
3. Run the container in privileged mode. This effectively disables usage of
seccomp. Add the `--privileged` parameter when creating the container.
[here]: https://bugzilla.mozilla.org/show_bug.cgi?id=1338771#c10
[latest official seccomp profile]: https://github.com/moby/moby/blob/master/profiles/seccomp/default.json
[seccomp profile]: https://docs.docker.com/engine/security/seccomp/
## Sound Support
For Firefox to be able to use the audio device available on
the host, `/dev/snd` must be exposed to the container by adding the
`--device /dev/snd` parameter to the `docker run` command.
## Setting Firefox Preferences Via Environment Variables
Firefox preferences can be set via environment variables
passed to the container. During the startup, a script process all these
variables and modify the preference file accordingly.
The name of the environment variable must start with `FF_PREF_`, followed by a
string of your choice. For example, `FF_PREF_MY_PREF` is a valid name.
The content of the variable should be in the format `NAME=VAL`, where `NAME` is
the name of the preference (as found in the `about:config` page) and `VAL` is
its value. A value can be one of the following types:
- string
- integer
- boolean
It is important to note that a value of type `string` should be surrounded by
double quotes. Other types don't need them.
For example, to set the `network.proxy.http` preference, one would pass the
environment variable to the container by adding the following argument to the
`docker run` command:
```
-e "FF_PREF_HTTP_PROXY=network.proxy.http=\"proxy.example.com\""
```
If a preference needs to be *removed*, its value should be set to `UNSET`. For
example:
```
-e "FF_PREF_HTTP_PROXY=network.proxy.http=UNSET"
```
**NOTE**: This is an advanced usage and it is recommended to set preferences
via Firefox directly.
## Troubleshooting
### Crashes
If Firefox is crashing frequently, make sure that:
- The `membarrier` system call is not blocked by Docker. See the
[Allowing the membarrier System Call](#allowing-the-membarrier-system-call)
for more details.
- Make sure the kernel of your Linux distribution is up-to-date.
## Support or Contact
Having troubles with the container or have questions? Please
[create a new issue].
For other great Dockerized applications, see https://jlesage.github.io/docker-apps.
[create a new issue]: https://github.com/jlesage/docker-firefox/issues

View file

@ -1,493 +0,0 @@
---
#
# Definitions for Firefox docker container.
#
# This file is used as data source to generate README.md and unRAID template files
# from Jinja2 templates.
#
app:
id: 14
name: firefox
friendly_name: Firefox
gui_type: x11
base_os: alpine
project:
description: |-
Mozilla Firefox is a free and open-source web browser developed by Mozilla
Foundation and its subsidiary, Mozilla Corporation.
url: https://www.mozilla.org/firefox/
unraid:
support_url: https://forums.unraid.net/topic/69440-support-firefox/
category: "Tools:"
documentation:
sections:
- title: Allowing the membarrier System Call
level: 2
content: |-
To properly work, recent versions of {{ app.friendly_name }} need the
`membarrier` system call. Without it, tabs would frequently crash.
Docker uses [seccomp profile] to restrict system calls available to the
container. Before Docker version `20.10.0`, the `membarrier` system call was
not allowed in the default profile. If you run a such version, you can use one
of the following solutions, from the most to the least secure, to provide the
container permission to use this sytem call:
1. Run the container with a custom seccomp profile allowing the `membarrier`
system call. The [latest official seccomp profile] can be used. Download
the file and then add the following parameter when creating the container:
`--security-opt seccomp=/path/to/seccomp_profile.json`.
2. Run the container without the default seccomp profile (thus allowing all
system calls). Use the following parameter when creating the container:
`--security-opt seccomp=unconfined`.
3. Run the container in privileged mode. This effectively disables usage of
seccomp. Add the `--privileged` parameter when creating the container.
[here]: https://bugzilla.mozilla.org/show_bug.cgi?id=1338771#c10
[latest official seccomp profile]: https://github.com/moby/moby/blob/master/profiles/seccomp/default.json
[seccomp profile]: https://docs.docker.com/engine/security/seccomp/
- title: Sound Support
level: 2
content: |-
For {{ app.friendly_name }} to be able to use the audio device available on
the host, `/dev/snd` must be exposed to the container by adding the
`--device /dev/snd` parameter to the `docker run` command.
- title: Setting {{ app.friendly_name }} Preferences Via Environment Variables
level: 2
content: |-
{{ app.friendly_name }} preferences can be set via environment variables
passed to the container. During the startup, a script process all these
variables and modify the preference file accordingly.
The name of the environment variable must start with `FF_PREF_`, followed by a
string of your choice. For example, `FF_PREF_MY_PREF` is a valid name.
The content of the variable should be in the format `NAME=VAL`, where `NAME` is
the name of the preference (as found in the `about:config` page) and `VAL` is
its value. A value can be one of the following types:
- string
- integer
- boolean
It is important to note that a value of type `string` should be surrounded by
double quotes. Other types don't need them.
For example, to set the `network.proxy.http` preference, one would pass the
environment variable to the container by adding the following argument to the
`docker run` command:
```
-e "FF_PREF_HTTP_PROXY=network.proxy.http=\"proxy.example.com\""
```
If a preference needs to be *removed*, its value should be set to `UNSET`. For
example:
```
-e "FF_PREF_HTTP_PROXY=network.proxy.http=UNSET"
```
**NOTE**: This is an advanced usage and it is recommended to set preferences
via {{ app.friendly_name }} directly.
- title: Troubleshooting
level: 2
- title: Crashes
level: 3
content: |-
If {{ app.friendly_name }} is crashing frequently, make sure that:
- The `membarrier` system call is not blocked by Docker. See the
[Allowing the membarrier System Call](#allowing-the-membarrier-system-call)
for more details.
- Make sure the kernel of your Linux distribution is up-to-date.
changelog:
- version: 25.04.1
date: 2025-04-06
changes:
- 'Updated Firefox to version 136.0.4-r0.'
- version: 25.03.1
date: 2025-03-19
changes:
- 'Updated Firefox to version 136.0-r0.'
- version: 25.02.2
date: 2025-02-16
changes:
- 'Updated Firefox to version 135.0-r0.'
- version: 25.02.1
date: 2025-02-09
changes:
- 'Updated Firefox to version 134.0-r0.'
- 'Updated baseimage to version 4.7.1, which brings the following changes (since last used version):'
- '2:Added environment variable that allows configuring the web authentication token lifetime.'
- '2:Fixed compatibility issues that were introduced with support of GTK4 applications.'
- '2:Increased the default service ready timeout from 5 seconds to 10 seconds and allow runtime adjustment via environment variable.'
- '2:Rebuild against latest distro images to get security fixes.'
- version: 24.12.1
date: 2024-12-07
changes:
- 'Updated Firefox to version 133.0-r0.'
- 'Updated baseimage to version 4.6.7, which brings the following changes:'
- '2:Fixed web audio feature with URL path-based reverse proxy.'
- '2:Fixed TLS secure connection method for VNC that was preventing web access.'
- '2:Fixed CJK font installation.'
- '2:Rebuild against latest distro images to get security fixes.'
- version: 24.11.1
date: 2024-11-11
changes:
- 'Updated Firefox to version 132.0-r0.'
- version: 24.10.1
date: 2024-10-28
changes:
- 'Updated Firefox to version 131.0.2-r0.'
- version: 24.09.1
date: 2024-09-29
changes:
- 'Updated Firefox to version 130.0.1-r0.'
- 'Updated baseimage to version 4.6.4, which brings the following changes:'
- '2:Fixed web authentication feature with URL path-based reverse proxy.'
- '2:Rebuild against latest distro images to get security fixes.'
- version: 24.08.1
date: 2024-08-05
changes:
- 'Updated Firefox to version 128.0.3-r0.'
- version: 24.07.1
date: 2024-07-02
changes:
- 'Updated Firefox to version 126.0.1-r0.'
- 'Updated baseimage to version 4.6.3, which brings the following changes:'
- '2:Audio support through web browser.'
- '2:Web authentication support.'
- '2:Better support of GTK4 applications.'
- '2:Updated noVNC to version 1.5.0.'
- '2:Updated web UI components (Bootstrap, Font Awesome).'
- '2:When connecting, the control bar is now temporarily shown only once.'
- '2:During package mirror setup, make sure to keep permissions of copied files.'
- version: 24.05.1
date: 2024-05-02
changes:
- 'Updated Firefox to version 125.0.3-r0.'
- version: 24.04.1
date: 2024-04-12
changes:
- 'Updated Firefox to version 124.0.1-r0.'
- version: 24.01.1
date: 2024-01-20
changes:
- 'Updated Firefox to version 120.0.1-r0.'
- 'Updated baseimage to version 4.5.3, based on Alpine Linux 3.19, which brings the following changes:'
- '2:Disabled fullscreen support when page is loaded into an iFrame.'
- '2:Rebuilt against latest distro images to get security fixes.'
- version: 23.11.3
date: 2023-11-19
changes:
- 'Updated baseimage to version 4.5.2, which brings the following changes:'
- '2:Fixed issue that would cause the helper that takes ownership of a directory to fail when using a very high user or group ID.'
- version: 23.11.2
date: 2023-11-10
changes:
- 'Updated baseimage to version 4.5.1, which brings the following changes:'
- '2:Mirror for packages installation can be set via the `PACKAGES_MIRROR` environment variable.'
- '2:Improved the way the `take-ownership` script is working.'
- '2:Readiness and minimum running time checks should not be done for a service defined with an interval.'
- '2:Raise an error when a synched service fails to start.'
- '2:Minimum running time check of a service was using an incorrect way to verify if process is still alive.'
- '2:Fixed installation of CJK font.'
- version: 23.11.1
date: 2023-11-09
changes:
- 'Updated Firefox to version 119.0-r0.'
- version: 23.08.2
date: 2023-08-20
changes:
- 'Updated Firefox to version 116.0.3-r0.'
- version: 23.08.1
date: 2023-08-04
changes:
- 'Updated Firefox to version 116.0-r0.'
- version: 23.06.1
date: 2023-06-24
changes:
- 'Updated Firefox to version 114.0.2-r0.'
- 'Fixed issue caused by the presence slash or backslash characters in Firefox preference''s value set via environment variable.'
- version: 23.05.2
date: 2023-05-27
changes:
- 'Updated Firefox to version 113.0.2-r1.'
- version: 23.05.1
date: 2023-05-19
changes:
- 'Updated Firefox to version 113.0.1-r1.'
- 'Updated baseimage to version 4.4.2, based on Alpine Linux 3.18, which brings the following changes:'
- '2:Rebuilt against latest distro images to get security fixes.'
- '2:Updated X server to version 1.20.14.'
- version: 23.04.1
date: 2023-04-29
changes:
- 'Fixed WebGL (software) support.'
- 'Reverted to using a font with better UTF-8 characters support.'
- 'Improved graceful shutdown of Firefox.'
- 'Updated baseimage to version 4.4.1, which brings the following changes:'
- '2:Updated TigerVNC to version 1.13.1.'
- version: 23.03.1
date: 2023-03-05
changes:
- 'Updated baseimage to version 4.4.0, which brings the following changes:'
- '2:Updated components providing access to application''s UI over web.'
- '2:Improved web UI usage with touch devices.'
- '2:Fixed issue with initialization of Linux users and groups when the `GROUP_ID` is also part of `SUP_GROUP_IDS`.'
- version: 23.02.3
date: 2023-02-13
changes:
- 'Updated baseimage to version 4.3.6, which brings the following changes:'
- '2:Limit the maximum number of opened files on system having a very large, unlimited value. This prevents unnecessary waste of CPU resources and time for applications trying to close all possible file descriptors.'
- 'Added default preference to prevent closing Firefox when closing the last tab.'
- version: 23.02.2
date: 2023-02-08
changes:
- 'Updated baseimage to version 4.3.4, which brings the following changes:'
- '2:Fixed error message from openbox about missing Fontconfig cache directory.'
- 'Do not use the OCI Docker image format yet to keep better compatibility (e.g with older docker clients).'
- version: 23.02.1
date: 2023-02-04
changes:
- 'Updated Firefox to version 109.0.1-r0.'
- 'Updated baseimage to version 4.3.3, which brings robustness related enhancements.'
- version: 23.01.1
date: 2023-01-04
changes:
- 'Updated Firefox to version 108.0.1-r1.'
- 'Update of the baseimage to version 4.3.1 brings the following changes:'
- '2:Control menu can be moved to the right side of the screen.'
- '2:Automatic focus of the clipboard text box when opening the control menu.'
- '2:Automatic close of the control menu when clicking into the application.'
- '2:Rotation of the internal web server log files.'
- version: 22.12.2
date: 2022-12-11
changes:
- 'Implemented workaround for issue seen with Synology devices where container would not start after an image update. The problem is caused by Synology explicitly setting all environment variables and keeping values from the old version.'
- version: 22.12.1
date: 2022-12-09
changes:
- 'Updated Firefox to version 107.0.1-r1.'
- 'Updated baseimage to version `4.2.1`, which brings multiple internal enhancements.'
- version: 22.10.4
date: 2022-10-24
changes:
- 'Update of the baseimage to version 4.1.1 brings the following changes:'
- '2:Collapse the setting section of the control panel by default on touch devices to accommodate the size taken by the on-screen keyboard.'
- '2:Include the Docker image platform in informational box printed during container startup.'
- '2:Fixed logmonitor crash on arm64 platform.'
- '2:A umask value of `0000` was not properly applied.'
- '2:Fixed issue where the window manager configuration may fail to load.'
- '2:Fixed errors from yad caused by usage of wrong fontconfig related files.'
- version: 22.10.3
date: 2022-10-14
changes:
- 'Fixed scenario where a reverse proxy with routing based un URL path is used.'
- version: 22.10.2
date: 2022-10-10
changes:
- 'Fixed an issue where taking ownership of `/config` would fail if a subfolder is mapped to a network share.'
- 'Fixed handling of exposed sound device.'
- 'Fixed handling of the VNC password.'
- version: 22.10.1
date: 2022-10-09
changes:
- 'Versioning scheme of the Docker image changed to `YY.MM.SEQUENCE`.'
- 'Updated Firefox to version 101.0.1-r0.'
- 'Added support for kiosk mode.'
- 'Added support for URL opening at launch.'
- 'Update of the baseimage to version 4.0.1 brings the following nbew features:'
- '2:Multi-arch image support.'
- '2:Support for dark mode.'
- '2:Support for remote window resize.'
- '2:Updated the web UI with a new, simplified and less intrusive look.'
- version: 1.18.0
date: 2021-12-30
changes:
- 'Updated Firefox to version 94.0-r0.'
- 'Now using baseimage version 3.5.8, based on Alpine 3.15, which brings the following change:'
- '2:Updated installed packages to get latest security fixes.'
- version: 1.17.1
date: 2021-04-13
changes:
- 'Now using baseimage version 3.5.7, which brings the following change:'
- '2:Updated installed packages to get latest security fixes.'
- version: 1.17.0
date: 2021-02-06
changes:
- 'Updated Firefox to version 84.0.2-r0.'
- version: 1.16.0
date: 2020-12-16
changes:
- 'Updated Firefox to version 83.0-r1.'
- version: 1.15.0
date: 2020-10-01
changes:
- 'Updated Firefox to version 81.0-r0'
- version: 1.14.0
date: 2020-08-05
changes:
- 'Upgraded Firefox to version 79.0-r0.'
- 'Now using baseimage to version 3.5.6, which brings the following changes:'
- '2:Other small adjustments for the YAD log monitor target.'
- version: 1.13.0
date: 2020-07-19
changes:
- 'Upgraded Firefox to version 78.0.2-r1.'
- 'Added check for missing `membarrier` system call support.'
- 'Now using baseimage v3.5.5, based on Alpine 3.12, which brings the following changes:'
- '2:Upgraded glibc to version 2.31 on Alpine Linux images with glibc integrated.'
- '2:Updated installed packages to get latest security fixes.'
- '2:Adjusted the log monitor target for recent versions of YAD.'
- version: 1.12.0
date: 2020-06-24
changes:
- 'Upgraded Firefox to version 77.0.1-r2.'
- version: 1.11.0
date: 2020-04-25
changes:
- 'Upgraded Firefox to version 75.0-r2.'
- version: 1.10.0
date: 2020-03-15
changes:
- 'Upgraded Firefox to version 74.0-r0.'
- version: 1.9.1
date: 2020-02-10
changes:
- 'Upgraded Firefox to version 72.0.2-r0.'
- version: 1.9.0
date: 2020-01-14
changes:
- 'Upgraded Firefox to version 72.0.1-r0.'
- version: 1.8.0
date: 2019-12-25
changes:
- 'Upgraded Firefox to version 71.0-r0.'
- 'Now using baseimage v3.5.3, which brings the following changes:'
- '2:Updated installed packages to get latest security fixes.'
- '2:Make sure the tzdata is installed.'
- 'Use baseimage based on Alpine Linux 3.10.'
- version: 1.7.1
date: 2019-08-26
changes:
- 'Upgraded Firefox to version 68.0.2-r0.'
- version: 1.7.0
date: 2019-08-05
changes:
- 'Upgraded Firefox to version 68.0.r0.'
- version: 1.6.0
date: 2019-07-17
changes:
- 'Upgraded Firefox to version 67.0.4-r0.'
- version: 1.5.1
date: 2019-05-12
changes:
- 'Upgraded Firefox to version 66.0.5-r1.'
- version: 1.5.0
date: 2019-05-09
changes:
- 'Upgraded Firefox to version 66.0.4-r0.'
- 'Print the Firefox version during the container startup.'
- version: 1.4.1
date: 2019-04-24
changes:
- 'Upgraded Firefox to version 62.0.3-r4.'
- 'Now using baseimage v3.5.2, which brings the following changes:'
- '2:Updated installed packages to get latest security fixes.'
- '2:Fixed issue where the container could have a zombie process.'
- '2:Fixed issue where the password would not be submitted when pressing the enter key in the password modal.'
- '2:Use relative path for favicon ressources to be more friendly with reverse proxy senarios.'
- version: 1.4.0
date: 2019-02-24
changes:
- 'Upgraded Firefox to version 62.0.3-r2.'
- 'Preferences can now be set via environment variables.'
- 'Use baseimage based on Alpine Linux 3.9.'
- version: 1.3.1
date: 2018-09-18
changes:
- 'Now using baseimage v3.5.1, which brings the following changes:'
- '2:Updated installed packages to get latest security fixes.'
- version: 1.3.0
date: 2018-07-27
changes:
- 'Added support for more playable video formats.'
- 'Added support for sound in Firefox.'
- version: 1.2.0
date: 2018-07-12
changes:
- 'Now using baseimage v3.4.0, which is based on Alpine Linux 3.8.'
- 'Upgraded Firefox to version 61.0.1-r0.'
- version: 1.1.0
date: 2018-05-31
changes:
- 'Upgraded Firefox to version 60.0.1-r0.'
- version: 1.0.2
date: 2018-03-15
changes:
- 'Fixed issue where Firefox would not gracefully terminate.'
- 'Fixed an issue where restoring session would resize window to the wrong dimensions.'
- version: 1.0.1
date: 2018-03-02
changes:
- 'Now using baseimage v3.3.4, which brings the following changes:'
- '2:Fixed issue where log monitor states were not cleared during container startup.'
- 'Updated Firefox to version 58.0.1-r2.'
- version: 1.0.0
date: 2018-02-16
changes:
- 'Initial release.'
container:
unsupported_volume: /storage
# Environment variables.
environment_variables:
- name: FF_OPEN_URL
description: >-
The URL to open when {{ app.friendly_name }} starts.
type: public
unraid_template:
title: "Open URL"
display: advanced
required: false
mask: false
- name: FF_KIOSK
description: >-
Set to `1` to enable kiosk mode. This mode launches Firefox in a very
restricted and limited mode best suitable for public areas or
customer-facing displays.
type: public
default: 0
unraid_template:
title: "Kiosk Mode"
description: >-
Set to 1 to enable kiosk mode. This mode launches Firefox in a very
restricted and limited mode best suitable for public areas or
customer-facing displays.
display: advanced
required: false
mask: false
- name: FF_CUSTOM_ARGS
description: >-
Custom argument(s) to pass when launching {{ app.friendly_name }}.
type: public
default: 0
unraid_template:
title: "Custom Arguments"
display: advanced
required: false
mask: false
# Volumes
volumes: []
# Network ports
ports: []
# Devices
devices:
- path: /dev/snd
description: Optional Linux device to expose to have sound.

20
compose.yaml Normal file
View file

@ -0,0 +1,20 @@
---
services:
docker-chromium:
image: git.mmbradley.ca/michaelbradley/docker-chromium:latest
container_name: docker-chromium
restart: unless-stopped
shm_size: 2gb
ports:
- '5800:5800'
volumes:
- ./config:/config
environment:
LANG: en_CA.UTF-8
TZ: America/Toronto
KEEP_APP_RUNNING: 1
WEB_AUDIO: 1
WEB_AUTHENTICATION: 1
WEB_AUTHENTICATION_USERNAME: username
WEB_AUTHENTICATION_PASSWORD: password
SECURE_CONNECTION: 1

View file

@ -1,10 +0,0 @@
#!/bin/sh
set -e # Exit immediately if a command exits with a non-zero status.
set -u # Treat unset variables as an error.
# Override what is set by the baseimage and do not set the variable. Needed for
# WebGL support.
exit 100
# vim:ft=sh:ts=4:sw=4:et:sts=4

View file

@ -5,8 +5,7 @@ set -u # Treat unset variables as an error.
# Make sure some directories are created. # Make sure some directories are created.
mkdir -p /config/downloads mkdir -p /config/downloads
mkdir -p /config/log/firefox mkdir -p /config/log/chromium
mkdir -p /config/profile
# Generate machine id. # Generate machine id.
if [ ! -f /config/machine-id ]; then if [ ! -f /config/machine-id ]; then
@ -14,14 +13,8 @@ if [ ! -f /config/machine-id ]; then
cat /proc/sys/kernel/random/uuid | tr -d '-' > /config/machine-id cat /proc/sys/kernel/random/uuid | tr -d '-' > /config/machine-id
fi fi
# Clean/optimize Firefox databases.
#if [ -d /config/.mozilla/firefox ] && [ -d /config/profile ]; then
# [ -f /config/.mozilla/firefox/profiles.ini ] || cp /defaults/profiles.ini /config/.mozilla/firefox/
# env HOME=/config /usr/bin/profile-cleaner f
#fi
# Initialize log files. # Initialize log files.
for LOG_FILE in /config/log/firefox/output.log /config/log/firefox/error.log for LOG_FILE in /config/log/chromium/output.log /config/log/chromium/error.log
do do
touch "$LOG_FILE" touch "$LOG_FILE"

View file

@ -1,47 +0,0 @@
#!/bin/sh
set -e
PREF_FILE="${1:-/config/profile/prefs.js}"
if [ -z "$PREF_FILE" ]; then
echo "ERROR: Preference file not set."
exit 1
fi
mkdir -p "$(dirname "$PREF_FILE")"
[ -f "$PREF_FILE" ] || touch "$PREF_FILE"
env | grep "^FF_PREF_" | while read -r ENV
do
ENAME="$(echo "$ENV" | cut -d '=' -f1)"
EVAL="$(echo "$ENV" | cut -d '=' -f2-)"
if [ -z "$EVAL" ]; then
echo "Skipping environment variable '$ENAME': no value set."
continue
fi
if echo "$EVAL" | grep -q "="; then
PNAME="$(echo "$EVAL" | cut -d '=' -f1)"
PVAL="$(echo "$EVAL" | cut -d '=' -f2-)"
[ -n "$PVAL" ] || PVAL='""'
else
PNAME="$EVAL"
PVAL='""'
fi
if [ "$PVAL" = "UNSET" ]; then
echo "Removing preference '$PNAME'..."
sed -i "/user_pref(\"$PNAME\",.*);/d" "$PREF_FILE"
elif grep -q "user_pref(\"$PNAME\"," "$PREF_FILE"; then
echo "Setting preference '$PNAME'..."
sed -i "/user_pref(\"$PNAME\",.*);/d" "$PREF_FILE"
echo "user_pref(\"$PNAME\", $(echo "$PVAL" | sed 's|\\|\\\\|g'));" >> "$PREF_FILE"
else
echo "Setting new preference '$PNAME'..."
echo "user_pref(\"$PNAME\", $(echo "$PVAL" | sed 's|\\|\\\\|g'));" >> "$PREF_FILE"
fi
done
# vim:ft=sh:ts=4:sw=4:et:sts=4

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# #
# Firefox doesn't gracefully shutdown when receiving SIGTERM. For example, last # Chromium doesn't gracefully shutdown when receiving SIGTERM. For example, last
# opened tabs may not be saved. Instead, terminate Firefox by sending the # opened tabs may not be saved. Instead, terminate Chromium by sending the
# CTRL+q key presses. # CTRL+q key presses.
# #
@ -14,7 +14,7 @@ xdotool key "ctrl+q"
for i in $(seq 1 10) for i in $(seq 1 10)
do do
if ! ps | grep "/usr/lib/firefox/firefox" | grep -q -v grep if ! ps | grep "/usr/lib/chromium/chromium" | grep -q -v grep
then then
break break
fi fi

View file

@ -3,25 +3,8 @@
set -e # Exit immediately if a command exits with a non-zero status. set -e # Exit immediately if a command exits with a non-zero status.
set -u # Treat unset variables as an error. set -u # Treat unset variables as an error.
# Set location of profile. # Always make browser take up full screen
echo "--profile" echo "--start-maximized"
echo "/config/profile"
# Make sure we don't get ask to be the default browser. # Disable sandboxing, which isn't supported in containers
echo "--setDefaultBrowser" echo "--no-sandbox"
# Check if kiosk mode is enabled.
if is-bool-val-true "${FF_KIOSK:-0}"; then
echo "--kiosk"
fi
# URL to open.
# NOTE: This should be the last argument.
if [ -n "${FF_OPEN_URL:-}" ]; then
echo "$FF_OPEN_URL"
fi
# Custom arguments.
if [ -n "${FF_CUSTOM_ARGS:-}" ]; then
eval 'for word in '$FF_CUSTOM_ARGS'; do echo "$word"; done'
fi

View file

@ -27,7 +27,7 @@ for PID in "$PIDS"; do
done done
set -e set -e
/usr/bin/firefox --version /usr/bin/chromium --version
exec /usr/bin/firefox "$@" >> /config/log/firefox/output.log 2>> /config/log/firefox/error.log exec /usr/bin/chromium "$@" >> /config/log/chromium/output.log 2>> /config/log/chromium/error.log
# vim:ft=sh:ts=4:sw=4:et:sts=4 # vim:ft=sh:ts=4:sw=4:et:sts=4

View file

@ -1,12 +0,0 @@
// Default download directory.
pref("browser.download.dir", "/config/downloads");
pref("browser.download.folderList", 2);
// Disable the privacy notice page.
pref("toolkit.telemetry.reportingpolicy.firstRun", false);
// Disable some warning messages.
pref("security.sandbox.warn_unprivileged_namespaces", false);
// Prevent closing Firefox when closing the last tab.
pref("browser.tabs.closeWindowWithLastTab", false);
// Disable confirmation before quitting with Ctrl+Q. Needed to allow Firefox
// to quit cleanly when container is shutted down.
pref("browser.warnOnQuitShortcut", false);