Compare commits

..

161 commits

Author SHA1 Message Date
8b19e3e5c3
Try to mitigate restart breakage 2025-05-18 00:58:30 -04:00
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
Jocelyn Le Sage
26bcee0b9f Added changelog for version 25.04.1. 2025-04-06 12:52:24 -04:00
Jocelyn Le Sage
2bfec8fafb Updated Firefox to version 136.0.4-r0. 2025-04-06 11:52:48 -04:00
Jocelyn Le Sage
9e00c0a557 Added changelog for version 25.03.1. 2025-03-19 21:26:42 -04:00
Jocelyn Le Sage
90d9da196c Updated Firefox to version 136.0-r0. 2025-03-19 21:14:32 -04:00
Jocelyn Le Sage
a8076d0cf4 Added changelog for version 25.02.2. 2025-02-16 20:04:23 -05:00
Jocelyn Le Sage
677fce75e9 Updated Firefox to version 135.0-r0. 2025-02-16 12:14:57 -05:00
Jocelyn Le Sage
52875c965b Updated license copyright year. 2025-02-12 20:16:22 -05:00
Jocelyn Le Sage
2ff9c7f7bc Added changelog for version 25.02.1. 2025-02-09 13:44:07 -05:00
Jocelyn Le Sage
b53e0f92f4 Update to the README. 2025-02-09 10:18:06 -05:00
Jocelyn Le Sage
c34a1d7dba Updated baseimage to version 4.7.1. 2025-02-07 16:44:04 -05:00
Jocelyn Le Sage
cd8e96dc18 Also push the Docker image to the GitHub Container Registry. 2025-02-07 15:14:46 -05:00
Jocelyn Le Sage
27ea856429 Updated README. 2025-01-20 07:44:53 -05:00
Jocelyn Le Sage
709b971613 Updated baseimage to version 4.7.0. 2025-01-20 07:30:21 -05:00
Jocelyn Le Sage
b0a8d378a2 Updated Firefox to version 134.0-r0. 2025-01-19 20:02:03 -05:00
Jocelyn Le Sage
2169680cf2 Added changelog for version 24.12.1. 2024-12-07 12:15:16 -05:00
Jocelyn Le Sage
9db4f58a14 Use jlumbroso/free-disk-space to free space on the build node. 2024-12-07 09:11:20 -05:00
Jocelyn Le Sage
ab4cc0e1e1 Updated Firefox to version 133.0-r0. 2024-12-06 12:31:21 -05:00
Jocelyn Le Sage
7bac59e542 Upgraded baseimage to version 4.6.7. 2024-12-06 11:56:28 -05:00
Jocelyn Le Sage
a7efaa4cc9 Updated Firefox to version 132.0.2-r0. 2024-12-05 10:14:07 -05:00
Jocelyn Le Sage
b7c4622ec5 Upgraded baseimage to version 4.6.6. 2024-12-05 10:06:06 -05:00
Jocelyn Le Sage
b0fc38fc50 Added changelog for version 24.11.1. 2024-11-11 14:17:55 -05:00
Jocelyn Le Sage
015885f405 Updated Firefox to version 132.0-r0. 2024-11-11 14:12:48 -05:00
Jocelyn Le Sage
8e0053eb85 Added changelog for version 24.10.1. 2024-10-28 20:50:01 -04:00
Jocelyn Le Sage
9f9a15d52c Updated Firefox to version 131.0.2-r0. 2024-10-28 20:43:02 -04:00
Jocelyn Le Sage
ef37ee14f0 Fixed packages URL. 2024-10-20 19:41:30 -04:00
Jocelyn Le Sage
ef9aab4d27 Fixed typo. 2024-09-29 17:55:04 -04:00
Jocelyn Le Sage
d875a6e074 Added changelog for version 24.09.1. 2024-09-29 17:48:43 -04:00
Jocelyn Le Sage
646af130f1 Disabled warning message. 2024-09-29 17:45:46 -04:00
Jocelyn Le Sage
c6c9fd6d33 Updated Firefox to verison 130.0.1-r0. 2024-09-29 17:34:33 -04:00
Jocelyn Le Sage
cf4c95031a Updated baseimage to version 4.6.4. 2024-09-16 06:42:22 -04:00
Jocelyn Le Sage
0279b73a36 Updated README. 2024-08-30 22:26:31 -04:00
Jocelyn Le Sage
36de296a7c Added changelog for version 24.08.1. 2024-08-05 09:53:43 -04:00
Jocelyn Le Sage
2220f9f59e Updated Firefox to version 128.0.3-r0. 2024-08-05 09:36:43 -04:00
Jocelyn Le Sage
b55c129451 Adjusted link to Firefox. 2024-08-05 09:35:29 -04:00
Jocelyn Le Sage
f0965432b3 Updated build-push-action to version 6. 2024-07-30 19:50:47 -04:00
Jocelyn Le Sage
10685cda38 Added changelog for version 24.07.1. 2024-07-02 07:54:27 -04:00
Jocelyn Le Sage
92d8d0cba7 Updated README. 2024-06-30 23:28:59 -04:00
Jocelyn Le Sage
b83f0a80b8 Added vim modeline. 2024-06-30 23:14:01 -04:00
Jocelyn Le Sage
a80c326107 Added FF_OPEN_URL and FF_KIOSK variables to unRAID template. 2024-06-30 23:06:41 -04:00
Jocelyn Le Sage
ebe461ade1 Added environment variable to specify custom arguments to pass to Firefox. 2024-06-30 23:05:50 -04:00
Jocelyn Le Sage
1e6d352a54 Updated baseimage to version 4.6.3. 2024-06-30 22:13:53 -04:00
Jocelyn Le Sage
b61088c666 Use helper to evaluate boolean value. 2024-06-30 22:13:10 -04:00
Jocelyn Le Sage
faf17984a7 Updated Firefox to version 126.0.1-r0 2024-06-27 16:00:09 -04:00
Jocelyn Le Sage
710d0195aa Keep usage of mesa drivers for WebGL support. 2024-06-27 15:53:51 -04:00
Jocelyn Le Sage
6d92c42446 Added pulse for audio support. 2024-06-27 15:53:03 -04:00
Jocelyn Le Sage
f4d003983b Updated baseimage to version 4.6.1. 2024-06-27 15:52:35 -04:00
Jocelyn Le Sage
3f7226c458 Added license. 2024-06-26 14:31:43 -04:00
Jocelyn Le Sage
cf6db111ee Added changelog for version 24.05.1. 2024-05-02 19:27:54 -04:00
Jocelyn Le Sage
ff708f8424 Updated Firefox to version 125.0.3-r0. 2024-05-02 18:58:59 -04:00
Jocelyn Le Sage
5d9dfa10ed Added changelog for version 24.04.1. 2024-04-12 18:42:58 -04:00
Jocelyn Le Sage
249a8a08b1 Updated Firefox to version 124.0.1-r0. 2024-04-12 18:37:17 -04:00
Jocelyn Le Sage
4937780d19 Updated GitHub actions to their latest version. 2024-03-03 14:56:29 -05:00
Jocelyn Le Sage
1cfbcbb163 Added changelog for version 24.01.1. 2024-01-20 12:11:19 -05:00
Jocelyn Le Sage
07172d48c4 Updated Firefox to version 120.0.1-r0. 2024-01-20 12:06:31 -05:00
Jocelyn Le Sage
55b696e86b Upgraded baseimage to version 4.5.3. 2024-01-06 17:55:53 -05:00
Jocelyn Le Sage
dd45572d56 Adjusted description of the UMASK variable. 2023-11-19 21:20:09 -05:00
Jocelyn Le Sage
100f346881 Added changelog for version 23.11.3. 2023-11-19 20:01:22 -05:00
Jocelyn Le Sage
f24768cb10 Upgraded baseimage to version 4.5.2. 2023-11-17 20:39:14 -05:00
Jocelyn Le Sage
727079fb95 Added changelog for version 23.11.2. 2023-11-10 11:09:32 -05:00
Jocelyn Le Sage
6416d706e5 Upgraded baseimage to version 4.5.1. 2023-11-10 10:30:26 -05:00
Jocelyn Le Sage
58a71b4316 Updated README. 2023-11-09 20:11:26 -05:00
Jocelyn Le Sage
45ef247768 Upgraded baseimage to version 4.5.0. 2023-11-09 19:55:40 -05:00
Jocelyn Le Sage
4d7754b5cf Added changelog for version 23.11.1. 2023-11-09 10:15:52 -05:00
Jocelyn Le Sage
c732564f3e Updated Firefox to version 119.0-r0. 2023-11-08 21:10:21 -05:00
Jocelyn Le Sage
e239c68c90 Added the base_os field. 2023-11-08 20:18:05 -05:00
Jocelyn Le Sage
007097d809 Added changelog for version 23.08.2. 2023-08-20 08:28:08 -04:00
Jocelyn Le Sage
1cdc7dd2c4 Updated Firefox to version 116.0.3-r0. 2023-08-19 16:02:07 -04:00
Jocelyn Le Sage
96aa2a1a5f Added missing language to code blocks and adjusted notes for better compatibility with mkdocs. 2023-08-19 15:50:22 -04:00
Jocelyn Le Sage
90f0b4fc60 Added changelog for version 23.08.1. 2023-08-04 08:41:07 -04:00
Jocelyn Le Sage
b6520153ea Updated Firefox to version 116.0-r0. 2023-08-04 08:33:00 -04:00
Jocelyn Le Sage
5a8c9ad176 Updated Firefox to version 115.0.2-r0. 2023-07-15 07:47:23 -04:00
Jocelyn Le Sage
7b3c810e4e Updated Firefox to version 115.0.1-r0. 2023-07-08 15:02:45 -04:00
Jocelyn Le Sage
c2284a5bdf Fixed change description that broke the YAML. 2023-06-24 16:24:18 -04:00
Jocelyn Le Sage
007911ab02 Added changelog for version 23.06.1. 2023-06-24 16:13:32 -04:00
Jocelyn Le Sage
b42447faed Also handle the character in preference's value. 2023-06-24 15:45:20 -04:00
Jocelyn Le Sage
55d32d5412 Escape '/' characters from preference's value when using it with sed. 2023-06-24 12:43:17 -04:00
Jocelyn Le Sage
450186aafb Updated Firefox to version 114.0.2-r0. 2023-06-24 11:51:19 -04:00
Jocelyn Le Sage
139546091b Fixed typos. 2023-06-22 10:55:00 -04:00
Jocelyn Le Sage
4b3f6c13ee Disabled blank issue. 2023-05-27 13:23:11 -04:00
Jocelyn Le Sage
da89a195d8 Added changelog for version 23.05.2. 2023-05-27 09:09:52 -04:00
Jocelyn Le Sage
0ef25bf3e8 Updated Firefox to version 113.0.2-r1. 2023-05-26 12:40:42 -04:00
Jocelyn Le Sage
1a02ed573d Added changelog for version 23.05.1. 2023-05-19 21:56:00 -04:00
Jocelyn Le Sage
8aed3ab11d Updated Firefox to version 113.0.1-r1. 2023-05-19 21:49:54 -04:00
Jocelyn Le Sage
1817c154d8 Using baseimage based on Alpine 3.18. 2023-05-19 21:49:39 -04:00
Jocelyn Le Sage
10df6ceabd Updated documentation about ports. 2023-05-19 13:08:59 -04:00
Jocelyn Le Sage
6ce877c3a3 Fixed changelog. 2023-05-19 07:18:24 -04:00
Jocelyn Le Sage
e18b85053f Upgraded baseimage to version 4.4.2. 2023-05-16 18:18:25 -04:00
Jocelyn Le Sage
e0add73e6a Updated funding custom URLs. 2023-05-16 15:21:24 -04:00
Jocelyn Le Sage
1edcd1f59d Adjusted badges in documentation. 2023-05-16 08:37:36 -04:00
Jocelyn Le Sage
f6ed2bb2c7 Checkout step is needed for pushing the dockerhub description. 2023-05-15 20:33:54 -04:00
Jocelyn Le Sage
a10441e319 Added GitHub issue templates. 2023-05-09 17:31:58 -04:00
Jocelyn Le Sage
1a5207e8c1 Removed the checkout step: buildx do its own checkout. 2023-05-09 16:41:27 -04:00
Jocelyn Le Sage
0e8f2f0493 Small update to the README. 2023-05-09 16:37:44 -04:00
Jocelyn Le Sage
3562aeb7d4 Do not send notification when build is started from pull request. 2023-05-08 15:26:35 -04:00
Jocelyn Le Sage
6b885bd0e4 Added changelog for version 23.04.1. 2023-04-29 16:07:42 -04:00
Jocelyn Le Sage
a16b8e177e Updated baseimage to version 4.4.1. 2023-04-19 13:59:27 -04:00
Jocelyn Le Sage
b1b68dcfea Moved all default preferences to the same location. 2023-04-08 21:56:02 -04:00
Jocelyn Le Sage
e1d32c30f2 Improved graceful shutdown of Firefox:
- By default, disable confirmation when quitting using the ctrl+q shortcut.
  - Wait for Firefox to quit after sending ctrl+q key presses.
2023-04-08 21:55:36 -04:00
Jocelyn Le Sage
9e679b45a8 Removed adjustment of the window size in Firefox profile. This is no
longer needed.
2023-04-08 21:17:31 -04:00
Jocelyn Le Sage
8ba2a096b4 Adjusted vim modeline. 2023-04-04 12:21:21 -04:00
Jocelyn Le Sage
c5d1e078fe Reverted to font with better UTF-8 characters support. 2023-04-04 12:19:55 -04:00
Jocelyn Le Sage
194cc6fc0a Fixed WebGL support. 2023-04-04 12:19:09 -04:00
Jocelyn Le Sage
a30e2a9d91 Fixed changelog. 2023-03-05 08:17:40 -05:00
Jocelyn Le Sage
9b076dd949 Added changelog for version 23.03.1. 2023-03-05 08:16:07 -05:00
Jocelyn Le Sage
6cd8411d7d Updated baseimage to version 4.4.0. 2023-03-04 12:05:31 -05:00
Jocelyn Le Sage
3c1065f7f6 Updated README. 2023-02-24 07:31:43 -05:00
Jocelyn Le Sage
f65da5c089 Added changelog for version 23.02.3. 2023-02-13 22:59:30 -05:00
Jocelyn Le Sage
d89c5b898e Updated baseimage to version 4.3.6. 2023-02-13 22:35:08 -05:00
Jocelyn Le Sage
1307948b88 Updated README. 2023-02-12 18:24:30 -05:00
Jocelyn Le Sage
1c4d7076e5 Adjusted application's title. 2023-02-11 23:07:58 -05:00
Jocelyn Le Sage
d27a479a7d Added browser.tabs.closeWindowWithLastTab to the default Firefox config. 2023-02-11 21:53:22 -05:00
Jocelyn Le Sage
007f31e2a6 Added changelog for version 23.02.2. 2023-02-08 08:13:29 -05:00
Jocelyn Le Sage
63e622767b Updated baseimage to version 4.3.4. 2023-02-07 20:59:34 -05:00
Jocelyn Le Sage
6977c0a9e0 Disable provenance attestation to keep better compatibility with older Docker clients. 2023-02-07 12:53:06 -05:00
Jocelyn Le Sage
b7364fd77b Updated README. 2023-02-05 12:56:44 -05:00
Jocelyn Le Sage
df55b20eb8 Added changelog for version 23.02.1. 2023-02-04 16:46:23 -05:00
Jocelyn Le Sage
a8a8a4e4b7 Updated Firefox to version 109.0.1-r0. 2023-02-04 16:01:05 -05:00
Jocelyn Le Sage
13ebef02ff Updated baseimage to version 4.3.3. 2023-02-04 16:00:18 -05:00
Jocelyn Le Sage
e96e3fed8e Removed rough_download_size: no longer used. 2023-02-04 15:59:57 -05:00
Jocelyn Le Sage
e4d13f84fa Updated READMEs. 2023-02-04 15:59:51 -05:00
Jocelyn Le Sage
491dceb3a8 Updated docker/build-push-action to v4. 2023-02-04 14:21:38 -05:00
Jocelyn Le Sage
5ce5f20f61 Added changelog for version 23.01.1. 2023-01-04 21:01:41 -05:00
Jocelyn Le Sage
070a17b05e Updated baseimage to version 4.3.1. 2023-01-04 20:40:12 -05:00
Jocelyn Le Sage
e4c8628bf9 The membarrier check is no longer done by the logmonitor. 2023-01-04 20:40:12 -05:00
Jocelyn Le Sage
071fb903b0 Firefox is no longer using /dev/shm. 2023-01-04 20:40:08 -05:00
Jocelyn Le Sage
974a94d2fd Updated README. 2023-01-04 20:34:38 -05:00
Jocelyn Le Sage
e8ea74ae35 Updated Firefox to version 108.0.1-r1. 2023-01-03 16:59:07 -05:00
Jocelyn Le Sage
f6f9714f37 Updated Firefox to version 108.0.1-r0. 2022-12-25 13:29:52 -05:00
Jocelyn Le Sage
4b9fba099c Removed unset default. 2022-12-20 17:44:32 -05:00
Jocelyn Le Sage
50fdfeeba2 Added changelog for version 22.12.2. 2022-12-11 18:44:19 -05:00
Jocelyn Le Sage
10be60dabc Updated baseimage to version 4.2.2. 2022-12-11 18:31:45 -05:00
Jocelyn Le Sage
5d50103550 Added changelog for version 22.12.1. 2022-12-09 14:22:17 -05:00
Jocelyn Le Sage
8221ae534c Make sure log files do not grow indefinitely. 2022-12-09 14:09:00 -05:00
Jocelyn Le Sage
bbf1a7c10e Udated README. 2022-12-09 14:08:09 -05:00
Jocelyn Le Sage
bd6953cfeb Changed font to a one using less space. 2022-12-09 13:57:55 -05:00
Jocelyn Le Sage
80044c77f7 - Updated Firefox to version 107.0.1-r1.
- Updated baseimage to version 4.2.1, based on Alpine 3.17.
2022-12-09 13:55:41 -05:00
Jocelyn Le Sage
b317a7de82 Adjusted wording of a changelog change. 2022-12-09 13:54:06 -05:00
Jocelyn Le Sage
193008005a Fixed typo. 2022-10-25 21:11:39 -04:00
Jocelyn Le Sage
507d7c4e2a Fixed paypal URL. 2022-10-25 21:11:39 -04:00
Jocelyn Le Sage
feacf0295d Adjusted rough download size. 2022-10-25 21:11:39 -04:00
Jocelyn Le Sage
b1e95e7f59 Added changelog for version 22.10.4. 2022-10-24 17:19:38 -04:00
Jocelyn Le Sage
7b3b62c036 Updated baseimage to version 4.1.1. 2022-10-24 10:45:02 -04:00
Jocelyn Le Sage
908c78c964 Added changelog for version 22.10.3. 2022-10-14 16:20:36 -04:00
Jocelyn Le Sage
3363850357 Updated baseimage to version 4.0.4. 2022-10-14 12:32:19 -04:00
Jocelyn Le Sage
ec2e47776c Added concurrency on workflow. 2022-10-13 16:59:26 -04:00
Jocelyn Le Sage
38fecc4d86 Replaced usage of the depricated set-output function. 2022-10-12 20:38:14 -04:00
Jocelyn Le Sage
011a7eb021 Cosmetic change. 2022-10-12 20:37:36 -04:00
Jocelyn Le Sage
a7b22a39aa No need to expose /config (already done by the baseimage). 2022-10-10 18:51:37 -04:00
Jocelyn Le Sage
e3322f7d93 Removed leftover files from old CI. 2022-10-10 18:13:41 -04:00
Jocelyn Le Sage
ddc77a277f Added changelog for version 22.10.2. 2022-10-10 18:08:55 -04:00
Jocelyn Le Sage
9e03c94778 Updated baseimage to version 4.0.2. 2022-10-10 17:55:19 -04:00
Jocelyn Le Sage
2b14dd6a9b Fixed handling of supplementary groups for sound device. 2022-10-10 13:49:40 -04:00
Jocelyn Le Sage
d52d8e95bf No need to take ownership of the config directory: this is done by the baseimage. 2022-10-09 23:56:48 -04:00
Jocelyn Le Sage
d2615c3028 Updated Docker hub description. 2022-10-09 22:57:59 -04:00
Jocelyn Le Sage
74e1036af7 Fixed push of docker hub description. 2022-10-09 22:50:08 -04:00
Jocelyn Le Sage
cb05ee9dfd Fixed inspect of image. 2022-10-09 22:39:48 -04:00
Jocelyn Le Sage
e2a2555d16 Added changelog for version 22.10.1. 2022-10-09 22:22:50 -04:00
35 changed files with 166 additions and 1492 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/0usd

View file

@ -1,158 +0,0 @@
name: Docker image CI/CD
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
run: |
# Free disk space.
echo "::group::Before"
df -h /
echo "::endgroup::"
echo "::group::Removing unneeded softwares and files..."
for DIR in /usr/local/lib/android /usr/share/dotnet /opt/ghc
do
if [ -d "$DIR" ]; then
echo "Removing $DIR..."
sudo rm -r "$DIR"
fi
done
echo "::endgroup::"
echo "::group::After"
df -h /
echo "::endgroup::"
- 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
# 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 ::set-output name=is_release::${IS_RELEASE}
echo ::set-output name=release_type::${RELEASE_TYPE}
echo ::set-output name=version::${VERSION}
echo ::set-output name=label_version::${LABEL_VERSION}
echo ::set-output name=tags::${TAGS}
#echo ::set-output name=build_date::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
- name: Checkout
uses: actions/checkout@v3
- name: Setup QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm,arm64,ppc64le,mips64,s390x
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
if: ${{ steps.prep.outputs.is_release == 'yes' }}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v3
with:
push: ${{ steps.prep.outputs.is_release == 'yes' }}
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 }}:${VERSION}
post-build:
name: Post-build
needs: [ build ]
runs-on: ubuntu-20.04
steps:
- name: Dockerhub description
if: ${{ steps.prep.outputs.release_type == 'standard' }}
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: ${{ env.DOCKER_IMAGE_NAME }}
readme-filepath: DOCKERHUB.md
notification:
name: Notification
needs: [ build, post-build ]
runs-on: ubuntu-20.04
if: ${{ always() }}
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,14 +0,0 @@
#
# Travis CI recipe to build docker image.
#
sudo: required
language: generic
services:
- docker
script:
- echo "Starting build of Docker image..."
- docker build --no-cache --pull -t $TRAVIS_REPO_SLUG:$TRAVIS_JOB_ID .

View file

@ -1,49 +0,0 @@
# Docker container for Firefox
[![Docker Image Size](https://img.shields.io/docker/image-size/jlesage/firefox/latest)](https://hub.docker.com/r/jlesage/firefox/tags) [![Build Status](https://github.com/jlesage/docker-firefox/actions/workflows/build-image.yml/badge.svg?branch=master)](https://github.com/jlesage/docker-firefox/actions/workflows/build-image.yml) [![GitHub Release](https://img.shields.io/github/release/jlesage/docker-firefox.svg)](https://github.com/jlesage/docker-firefox/releases/latest) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/JocelynLeSage/0usd)
This is a Docker container for [Firefox](https://www.mozilla.org/en-US/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=200)](https://www.mozilla.org/en-US/firefox/)[![Firefox](https://dummyimage.com/400x110/ffffff/575757&text=Firefox)](https://www.mozilla.org/en-US/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 \
--shm-size 2g \
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.
@ -13,124 +13,53 @@ RUN gcc -static -o membarrier_check membarrier_check.c
RUN strip membarrier_check
# Pull base image.
FROM jlesage/baseimage-gui:alpine-3.16-v4.0.1
FROM jlesage/baseimage-gui:alpine-3.21-v4.7.1
# Docker image version is provided via build arg.
ARG DOCKER_IMAGE_VERSION=
ARG DOCKER_IMAGE_VERSION=v0.1.0
# Define software versions.
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 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
ARG CHROMIUM_VERSION=136.0.7103.113-r0
# Define working directory.
WORKDIR /tmp
# Install JSONLZ4 tools.
RUN \
add-pkg --virtual build-dependencies \
curl \
build-base \
&& \
mkdir jsonlz4 && \
mkdir lz4 && \
curl -# -L {$JSONLZ4_URL} | tar xz --strip 1 -C jsonlz4 && \
curl -# -L {$LZ4_URL} | tar xz --strip 1 -C lz4 && \
mv jsonlz4/src/ref_compress/*.c jsonlz4/src/ && \
cp lz4/lib/lz4.* jsonlz4/src/ && \
cd jsonlz4 && \
gcc -static -Wall -o dejsonlz4 src/dejsonlz4.c src/lz4.c && \
gcc -static -Wall -o jsonlz4 src/jsonlz4.c src/lz4.c && \
strip dejsonlz4 jsonlz4 && \
cp -v dejsonlz4 /usr/bin/ && \
cp -v jsonlz4 /usr/bin/ && \
cd .. && \
# Cleanup.
del-pkg build-dependencies && \
rm -rf /tmp/* /tmp/.[!.]*
# Install Firefox.
# Install Chromium.
RUN \
# add-pkg --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \
# --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \
# --upgrade firefox=${FIREFOX_VERSION}
add-pkg firefox=${FIREFOX_VERSION}
# --upgrade chromium=${CHROMIUM_VERSION}
add-pkg chromium=${CHROMIUM_VERSION}
# Install extra packages.
RUN \
add-pkg \
# WebGL support.
mesa-dri-gallium \
# Audio support.
libpulse \
# Icons used by folder/file selection window (when saving as).
gnome-icon-theme \
adwaita-icon-theme \
# A font is needed.
ttf-dejavu \
font-dejavu \
# 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 \
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
# 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.
COPY rootfs/ /
COPY --from=membarrier /tmp/membarrier_check /usr/bin/
# Set internal environment variables.
RUN \
set-cont-env APP_NAME "Firefox" && \
set-cont-env APP_VERSION "$FIREFOX_VERSION" && \
set-cont-env APP_NAME "Chromium" && \
set-cont-env APP_VERSION "$CHROMIUM_VERSION" && \
set-cont-env DOCKER_IMAGE_VERSION "$DOCKER_IMAGE_VERSION" && \
true
# Set public environment variables.
ENV \
FF_OPEN_URL= \
FF_KIOSK=0
# Define mountable directories.
VOLUME ["/config"]
# Metadata.
LABEL \
org.label-schema.name="firefox" \
org.label-schema.description="Docker container for Firefox" \
org.label-schema.name="chromium" \
org.label-schema.description="Docker container for Chromium" \
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"

22
LICENSE Normal file
View file

@ -0,0 +1,22 @@
MIT License
Copyright (c) 2025 Jocelyn Le Sage
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

584
README.md
View file

@ -1,583 +1,3 @@
# Docker container for Firefox
[![Docker Image Size](https://img.shields.io/docker/image-size/jlesage/firefox/latest)](https://hub.docker.com/r/jlesage/firefox/tags) [![Build Status](https://github.com/jlesage/docker-firefox/actions/workflows/build-image.yml/badge.svg?branch=master)](https://github.com/jlesage/docker-firefox/actions/workflows/build-image.yml) [![GitHub Release](https://img.shields.io/github/release/jlesage/docker-firefox.svg)](https://github.com/jlesage/docker-firefox/releases/latest) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/JocelynLeSage/0usd)
# Docker container for Chromium
This is a Docker container for [Firefox](https://www.mozilla.org/en-US/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=200)](https://www.mozilla.org/en-US/firefox/)[![Firefox](https://images.placeholders.dev/?width=224&height=110&fontFamily=Georgia,sans-serif&fontWeight=400&fontSize=52&text=Firefox&bgColor=rgba(0,0,0,0.0)&textColor=rgba(121,121,121,1))](https://www.mozilla.org/en-US/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)
* [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)
* [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)
* [Increasing Shared Memory Size](#increasing-shared-memory-size)
* [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
**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 \
--shm-size 2g \
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>]... \
--shm-size VALUE \
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. |
| --shm-size | Set the size of `/dev/shm` to `VALUE`. The format of `VALUE` is `<number><unit>`, where `number` must be greater than `0` and `unit` can be `b` (bytes), `k` (kilobytes), `m` (megabytes), or `g` (gigabytes). **NOTE**: To avoid crashes, it is recommended to set this value to `2g`. |
### 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. | `""` |
|`UMASK`| Mask that controls how file permissions are set for newly created files. The value of the mask is in octal notation. By default, the default umask value is `0022`, meaning that newly created files are readable by everyone, but only writable by the owner. See the online umask calculator at http://wintelguy.com/umask-calc.pl. | `0022` |
|`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. Packages are installed from the repository of the Linux distribution this container is based on. **ATTENTION**: Container functionality can be affected when installing a package that overrides existing container files (e.g. binaries). | `""` |
|`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` |
|`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. | `""` |
|`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. | (unset) |
|`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` |
### 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. They can be mapped to the host
via the `-p` parameter (one per port mapping). Each mapping is defined in the
following format: `<HOST_PORT>:<CONTAINER_PORT>`. The port number inside the
container cannot be changed, but you are free to use any port on the host side.
| Port | Mapping to host | Description |
|------|-----------------|-------------|
| 5800 | 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 | 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):
```
docker stop firefox
```
2. Remove the container:
```
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. Prio 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:
```
docker pull jlesage/firefox
```
2. Stop the container:
```
docker stop firefox
```
3. Remove the container:
```
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:
```
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:
```
http://<HOST IP ADDR>:5800
```
* Any VNC client:
```
<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:
```
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.|
**NOTE**: 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.
**ATTENTION**: 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.
## 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:
```
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;
}
}
```
### 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:
```
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/;
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 (e.g. `crashplan-pro`).
## Increasing Shared Memory Size
To prevent crashes from happening when running Firefox
inside a Docker container, the size of the shared memory located at `/dev/shm`
must be increased. The issue is documented [here].
By default, the size is 64MB, which is not enough. It is recommended to use a
size of 2GB. This value is arbitrary, but known to work well. Setting the
size of `/dev/shm` can be done via two method:
- By adding the `--shm-size 2g` parameter to the `docker run` command. See
the [Usage](#usage) section for more details.
- By using shared memory of the host, by mapping `/dev/shm` via the parameter
`-v /dev/shm:/dev/shm` of the `docker run` command.
## 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 size of the shared memory located at `/dev/shm` has been increased. See
the [Increasing Shared Memory Size](#increasing-shared-memory-size) section
for more details.
- 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
Based off of [jlesage/docker-firefox](https://github.com/jlesage/docker-firefox/)

View file

@ -1,299 +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
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/en-US/firefox/
unraid:
support_url: https://forums.unraid.net/topic/69440-support-firefox/
category: "Tools:"
documentation:
sections:
- title: Increasing Shared Memory Size
level: 2
content: |-
To prevent crashes from happening when running {{ app.friendly_name }}
inside a Docker container, the size of the shared memory located at `/dev/shm`
must be increased. The issue is documented [here].
By default, the size is 64MB, which is not enough. It is recommended to use a
size of 2GB. This value is arbitrary, but known to work well. Setting the
size of `/dev/shm` can be done via two method:
- By adding the `--shm-size 2g` parameter to the `docker run` command. See
the [Usage](#usage) section for more details.
- By using shared memory of the host, by mapping `/dev/shm` via the parameter
`-v /dev/shm:/dev/shm` of the `docker run` command.
- 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 size of the shared memory located at `/dev/shm` has been increased. See
the [Increasing Shared Memory Size](#increasing-shared-memory-size) section
for more details.
- 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: 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:
rough_download_size: 150MB
unsupported_volume: /storage
# Environment variables.
environment_variables:
- name: FF_OPEN_URL
description: >-
The URL to open when {{ app.friendly_name }} starts.
type: public
default:
- 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
# Volumes
volumes: []
# Network ports
ports: []
# Devices
devices:
- path: /dev/snd
description: Optional Linux device to expose to have sound.
# Extra parameters
extra_params:
- name: shm-size
value: 2g
description: >-
Set the size of `/dev/shm` to `VALUE`. The format of `VALUE` is
`<number><unit>`, where `number` must be greater than `0` and `unit`
can be `b` (bytes), `k` (kilobytes), `m` (megabytes), or `g`
(gigabytes). **NOTE**: To avoid crashes, it is recommended to set this
value to `2g`.
include_in_quick_start: true

21
compose.yaml Normal file
View file

@ -0,0 +1,21 @@
---
services:
docker-chromium:
image: git.mmbradley.ca/michaelbradley/docker-chromium:latest
container_name: docker-chromium
restart: unless-stopped
shm_size: 2gb
ports:
- '5800:5800'
# Seems to break on restarts, recommend only using for debugging
# 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,39 +0,0 @@
#!/bin/bash
#
# Post push hook for Docker Automated Build.
#
# This hook adds the 'latest' tag to the image.
#
set -e # Exit immediately if a command exits with a non-zero status.
set -u # Treat unset variables as an error.
source custom_hook_env
echo "Environment variables:
IMAGE_NAME=$IMAGE_NAME
DOCKER_REPO=$DOCKER_REPO
DOCKER_TAG=$DOCKER_TAG
SOURCE_BRANCH=$SOURCE_BRANCH
IMAGE_VERSION=$IMAGE_VERSION
"
if [[ "$DOCKER_TAG" =~ v[0-9]+\.[0-9]+\.[0-9]+-alpha[0-9]+$ ]]; then
DOCKER_NEWTAG="$(echo "$DOCKER_TAG" | sed 's/-alpha[0-9]\+$/-alpha/')"
elif [[ "$DOCKER_TAG" =~ v[0-9]+\.[0-9]+\.[0-9]+-beta[0-9]+$ ]]; then
DOCKER_NEWTAG="$(echo "$DOCKER_TAG" | sed 's/-beta[0-9]\+$/-beta/')"
elif [[ "$DOCKER_TAG" =~ v[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+$ ]]; then
DOCKER_NEWTAG="$(echo "$DOCKER_TAG" | sed 's/-rc[0-9]\+$/-rc/')"
elif [[ "$DOCKER_TAG" =~ v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
DOCKER_NEWTAG="latest"
else
echo "ERROR: Invalid docker tag."
exit 1
fi
echo "Adding tag '$DOCKER_NEWTAG' to image..."
docker tag $IMAGE_NAME ${DOCKER_REPO}:$DOCKER_NEWTAG
echo "Pushing image..."
docker push ${DOCKER_REPO}:$DOCKER_NEWTAG
echo "post_push hook terminated successfully."

View file

@ -1,38 +0,0 @@
#!/bin/bash
#
# Pre build hook for Docker Automated Build.
#
# This hooks modifies the Dockerfile by inserting the image version in the
# related label.
#
set -e # Exit immediately if a command exits with a non-zero status.
set -u # Treat unset variables as an error.
# Make sure the DOCKER_TAG has a supported format like:
# v1.0.0
# v0.1.0-beta1
# v2.0.0-rc2
if [[ ! "$DOCKER_TAG" =~ ^v[0-9\.]+(-(alpha|beta|rc)[0-9]+)?$ ]]; then
echo "Unsupported DOCKER_TAG: $DOCKER_TAG"
exit 1
fi
# The version to use is the same has the DOCKER_TAG, minus the initial 'v'.
IMAGE_VERSION="${DOCKER_TAG:1}"
# Export our custom variables.
echo "IMAGE_VERSION=\"$IMAGE_VERSION\"" >> custom_hook_env
echo "Environment variables:
IMAGE_NAME=$IMAGE_NAME
DOCKER_REPO=$DOCKER_REPO
DOCKER_TAG=$DOCKER_TAG
SOURCE_BRANCH=$SOURCE_BRANCH
IMAGE_VERSION=$IMAGE_VERSION
"
echo "Inserting image version in Dockerfile..."
sed -i "s/org.label-schema.version=\"unknown\"/org.label-schema.version=\"$IMAGE_VERSION\"/" Dockerfile
echo "pre_build hook terminated successfully."

View file

@ -1,2 +0,0 @@
// Disable the privacy notice page.
user_pref("toolkit.telemetry.reportingpolicy.firstRun", false);

View file

@ -13,9 +13,5 @@ fi
# Save the associated group.
SND_GRP="$(find "$SND_DEV" -maxdepth 1 -not -type d -exec stat -c "%g" {} \; | sort -u | tail -n1)"
echo "sound device group $SND_GRP."
if [ -f /var/run/s6/container_environment/SUP_GROUP_IDS ]; then
echo -n "," >> /var/run/s6/container_environment/SUP_GROUP_IDS
fi
echo -n "$SND_GRP" >> /var/run/s6/container_environment/SUP_GROUP_IDS
# vim: set ft=sh :
# vim:ft=sh:ts=4:sw=4:et:sts=4

View file

@ -0,0 +1,27 @@
#!/bin/sh
set -e # Exit immediately if a command exits with a non-zero status.
set -u # Treat unset variables as an error.
# Make sure some directories are created.
mkdir -p /config/downloads
mkdir -p /config/log/chromium
# Generate machine id.
if [ ! -f /config/machine-id ]; then
echo "generating machine-id..."
cat /proc/sys/kernel/random/uuid | tr -d '-' > /config/machine-id
fi
# Initialize log files.
for LOG_FILE in /config/log/chromium/output.log /config/log/chromium/error.log
do
touch "$LOG_FILE"
# Make sure the file doesn't grow indefinitely.
if [ "$(stat -c %s "$LOG_FILE")" -gt 1048576 ]; then
echo > "$LOG_FILE"
fi
done
# vim:ft=sh:ts=4:sw=4:et:sts=4

View file

@ -1,74 +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.
# Make sure some directories are created.
mkdir -p /config/downloads
mkdir -p /config/log/firefox
mkdir -p /config/profile
# Generate machine id.
if [ ! -f /config/machine-id ]; then
echo "generating machine-id..."
cat /proc/sys/kernel/random/uuid | tr -d '-' > /config/machine-id
fi
# Copy default preferences.
[ -f /config/profile/prefs.js ] || cp /defaults/prefs.js /config/profile/prefs.js
# Verify the size of /dev/shm.
SHM_SIZE_MB="$(df -m /dev/shm | tail -n 1 | tr -s ' ' | cut -d ' ' -f2)"
if [ "$SHM_SIZE_MB" -eq 64 ]; then
echo 'SHM_CHECK_FAIL' > /tmp/.firefox_shm_check
else
echo 'SHM_CHECK_PASS' > /tmp/.firefox_shm_check
fi
chown $USER_ID:$GROUP_ID /tmp/.firefox_shm_check
if /usr/bin/membarrier_check 2>/dev/null; then
echo 'MEMBARRIER_CHECK_PASS' > /tmp/.firefox_membarrier_check
else
echo 'MEMBARRIER_CHECK_FAIL' > /tmp/.firefox_membarrier_check
fi
chown $USER_ID:$GROUP_ID /tmp/.firefox_membarrier_check
# 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
# Fix window display size is session stores.
if [ -n "$(ls /config/profile/sessionstore-backups/*.jsonlz4 2>/dev/null)" ]; then
for FILE in /config/profile/sessionstore-backups/*.jsonlz4; do
WORKDIR="$(mktemp -d)"
dejsonlz4 "$FILE" "$WORKDIR"/json
cp "$WORKDIR"/json "$WORKDIR"/json.orig
sed -i 's/"width":[0-9]\+/"width":'$DISPLAY_WIDTH'/' "$WORKDIR"/json
sed -i 's/"height":[0-9]\+/"height":'$DISPLAY_HEIGHT'/' "$WORKDIR"/json
sed -i 's/"screenX":[0-9]\+/"screenX":0/' "$WORKDIR"/json
sed -i 's/"screenY":[0-9]\+/"screenY":0/' "$WORKDIR"/json
if ! diff "$WORKDIR"/json "$WORKDIR"/json.orig >/dev/null; then
jsonlz4 "$WORKDIR"/json "$WORKDIR"/jsonlz4
mv "$WORKDIR"/jsonlz4 "$FILE"
echo "fixed display size in $FILE."
fi
rm -r "$WORKDIR"
done
fi
# Make sure monitored log files exist.
for LOG_FILE in /config/log/firefox/error.log
do
touch "$LOG_FILE"
done
# Take ownership of the config directory content.
find /config -mindepth 1 -exec chown $USER_ID:$GROUP_ID {} \;
# vim: set ft=sh :

View file

@ -1,44 +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 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 "s/user_pref(\"$PNAME\",.*);/user_pref(\"$PNAME\", $PVAL);/" "$PREF_FILE"
else
echo "Setting new preference '$PNAME'..."
echo "user_pref(\"$PNAME\", $PVAL);" >> "$PREF_FILE"
fi
done

View file

@ -1,2 +0,0 @@
<Type>normal</Type>
<Name>^Navigator</Name>

View file

@ -1,2 +0,0 @@
#!/bin/sh
echo "$APP_NAME is likely to crash because it requires the membarrier system call. See the documentation of this Docker container to find out how this system call can be allowed."

View file

@ -1,16 +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.
LINE="$1"
if [ "$LINE" = "MEMBARRIER_CHECK_FAIL" ]; then
echo 'MEMBARRIER_CHECK_ACK' > /tmp/.firefox_membarrier_check
exit 0
fi
# No match found.
exit 1
# vim: set ft=sh :

View file

@ -1 +0,0 @@
WARNING

View file

@ -1,2 +0,0 @@
#!/bin/sh
echo "$APP_NAME requires the membarrier system call."

View file

@ -1,2 +0,0 @@
#!/bin/sh
echo "$APP_NAME is likely to crash because of the lack of shared memory. Size of shared memory needs to be increased. See the documentation of the Docker container to find out how this can be done."

View file

@ -1,16 +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.
LINE="$1"
if [ "$LINE" = "SHM_CHECK_FAIL" ]; then
echo 'SHM_CHECK_ACK' > /tmp/.firefox_shm_check
exit 0
fi
# No match found.
exit 1
# vim: set ft=sh :

View file

@ -1 +0,0 @@
WARNING

View file

@ -1,2 +0,0 @@
#!/bin/sh
echo "$APP_NAME lacks of shared memory."

View file

@ -1,2 +0,0 @@
#!/bin/sh
echo "A $APP_NAME tab crashed because of the lack of shared memory. Size of shared memory needs to be increased. See the documentation of this Docker container to find out how this can be done."

View file

@ -1,17 +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.
LINE="$1"
#if echo "$LINE" | grep -q "OutOfMemoryError occurred...RESTARTING!"; then
if [ "$LINE" = "###!!! [Parent][MessageChannel] Error: (msgtype=0x150084,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv" ]
then
exit 0
fi
# No match found.
exit 1
# vim: set ft=sh :

View file

@ -1,2 +0,0 @@
#!/bin/sh
echo "$APP_NAME lacks of shared memory."

View file

@ -0,0 +1,2 @@
<Type>normal</Type>
<Name>Navigator</Name>

View file

@ -1,14 +1,25 @@
#!/bin/sh
#
# When receiving SIGTERM, Firefox doesn't qui immediately and instead ask for
# confirmation. Instead, terminate Firefox by sending the CTRL+q key presses.
# Chromium doesn't gracefully shutdown when receiving SIGTERM. For example, last
# opened tabs may not be saved. Instead, terminate Chromium by sending the
# CTRL+q key presses.
#
set -e # Exit immediately if a command exits with a non-zero status.
set -u # Treat unset variables as an error.
xdotool key "Escape"
sleep 0.5
xdotool key "ctrl+q"
for i in $(seq 1 10)
do
if ! ps | grep "/usr/lib/chromium/chromium" | grep -q -v grep
then
break
fi
sleep 0.5
done
# vim:ft=sh:ts=4:sw=4:et:sts=4

View file

@ -3,20 +3,8 @@
set -e # Exit immediately if a command exits with a non-zero status.
set -u # Treat unset variables as an error.
# Set location of profile.
echo "--profile"
echo "/config/profile"
# Always make browser take up full screen
echo "--start-maximized"
# Make sure we don't get ask to be the default browser.
echo "--setDefaultBrowser"
# Check if kiosk mode is enabled.
if [ "${FF_KIOSK:-0}" == 1 ]; 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
# Disable sandboxing, which isn't supported in containers
echo "--no-sandbox"

28
rootfs/etc/services.d/app/sgid Executable file
View file

@ -0,0 +1,28 @@
#!/bin/sh
#
# Get the supplementary group ID(s) needed to access sound device. These are
# added to the ones provided by $SUP_GROUP_IDS.
#
set -e # Exit immediately if a command exits with a non-zero status.
set -u # Treat unset variables as an error.
SND_DEV="/dev/snd"
SUP_GROUP_IDS="${SUP_GROUP_IDS:-}"
# Add group associated to the sound device.
if [ -d "$SND_DEV" ]; then
# Save the associated group.
SND_GRP="$(find "$SND_DEV" -maxdepth 1 -not -type d -exec stat -c "%g" {} \; | sort -u | tail -n1)"
if [ -n "$SUP_GROUP_IDS" ]; then
SUP_GROUP_IDS="$SUP_GROUP_IDS,$SND_GRP"
else
SUP_GROUP_IDS="$SND_GRP"
fi
fi
echo "$SUP_GROUP_IDS" | tr ',' '\n'
# vim:ft=sh:ts=4:sw=4:et:sts=4

View file

@ -5,5 +5,29 @@ set -u # Treat unset variables as an error.
export HOME=/config
/usr/bin/firefox --version
exec /usr/bin/firefox "$@" >> /config/log/firefox/output.log 2>> /config/log/firefox/error.log
PIDS=
notify() {
for N in $(ls /etc/logmonitor/targets.d/*/send)
do
"$N" "$1" "$2" "$3" &
PIDS="$PIDS $!"
done
}
# Verify support for membarrier.
if ! /usr/bin/membarrier_check 2>/dev/null; then
notify "$APP_NAME requires the membarrier system call." "$APP_NAME is likely to crash because it requires the membarrier system call. See the documentation of this Docker container to find out how this system call can be allowed." "WARNING"
fi
# Wait for all PIDs to terminate.
set +e
for PID in "$PIDS"; do
wait $PID
done
set -e
/usr/bin/chromium --version
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