mirror of
https://github.com/woodchen-ink/docker-firefox.git
synced 2025-07-18 05:42:00 +08:00
Disable the privacy notice page on first start.
This commit is contained in:
parent
f7c185ea27
commit
b18027ec44
2
rootfs/defaults/prefs.js
Normal file
2
rootfs/defaults/prefs.js
Normal file
@ -0,0 +1,2 @@
|
||||
// Disable the privacy notice page.
|
||||
user_pref("toolkit.telemetry.reportingpolicy.firstRun", false);
|
@ -6,6 +6,7 @@ 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 /etc/machine-id ]; then
|
||||
@ -13,6 +14,9 @@ if [ ! -f /etc/machine-id ]; then
|
||||
cat /proc/sys/kernel/random/uuid | tr -d '-' > /etc/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
|
||||
|
@ -4,6 +4,6 @@ set -e # Exit immediately if a command exits with a non-zero status.
|
||||
set -u # Treat unset variables as an error.
|
||||
|
||||
export HOME=/config
|
||||
mkdir -p /config/profile
|
||||
|
||||
/usr/bin/firefox --version
|
||||
exec /usr/bin/firefox --profile /config/profile --setDefaultBrowser >> /config/log/firefox/output.log 2>> /config/log/firefox/error.log
|
||||
|
Loading…
x
Reference in New Issue
Block a user