Initial commit
This commit is contained in:
commit
6fa2b1da3d
36
Dockerfile
Normal file
36
Dockerfile
Normal file
@ -0,0 +1,36 @@
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y wget gnupg \
|
||||
&& wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- \
|
||||
| tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null \
|
||||
&& gpg -n -q --no-options --import --import-options import-show /etc/apt/keyrings/packages.mozilla.org.asc \
|
||||
| awk '/pub/{getline; gsub(/^ +| +$/,""); if($0 == "35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3") print "\nThe key fingerprint matches ("$0").\n"; else print "\nVerification failed: the fingerprint ("$0") does not match the expected one.\n"}' \
|
||||
&& echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" \
|
||||
| tee -a /etc/apt/sources.list.d/mozilla.list > /dev/null \
|
||||
&& echo 'Package: *\nPin: origin packages.mozilla.org\nPin-Priority: 1000\n' \
|
||||
| tee /etc/apt/preferences.d/mozilla \
|
||||
&& apt-get update && apt-get install -y \
|
||||
apulse \
|
||||
ca-certificates \
|
||||
ffmpeg \
|
||||
firefox \
|
||||
hicolor-icon-theme \
|
||||
libasound2 \
|
||||
libgl1-mesa-dri \
|
||||
libgl1-mesa-glx \
|
||||
libpulse0 \
|
||||
fonts-noto \
|
||||
fonts-noto-cjk \
|
||||
fonts-noto-color-emoji \
|
||||
--no-install-recommends \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV LANG=C.UTF-8
|
||||
|
||||
COPY local.conf /etc/fonts/local.conf
|
||||
|
||||
RUN echo 'pref("browser.tabs.remote.autostart", false);' >> /usr/lib/firefox/defaults/pref/package-prefs.js
|
||||
|
||||
COPY entrypoint.sh /usr/bin/startfirefox
|
||||
|
||||
ENTRYPOINT [ "startfirefox" ]
|
30
README.md
Normal file
30
README.md
Normal file
@ -0,0 +1,30 @@
|
||||
## Requirements
|
||||
|
||||
- [Docker Engine](https://docs.docker.com/engine/) (Docker Desktop is not required!)
|
||||
- [x11docker](https://github.com/mviereck/x11docker)
|
||||
|
||||
## Build browser image
|
||||
|
||||
$ docker build -t firefox .
|
||||
|
||||
## X server image
|
||||
|
||||
To use the `--xc` option, we need either to pull the out-dated image,
|
||||
|
||||
$ docker pull x11docker/xserver
|
||||
|
||||
or, to build a newer image locally (preferred).
|
||||
|
||||
$ x11docker --build x11docker/xserver
|
||||
|
||||
## Run
|
||||
|
||||
$ ./x11docker -I --xc --share $HOME/Downloads -- --tmpfs /dev/shm -- firefox
|
||||
|
||||
## References
|
||||
|
||||
- based on [Jessie Frazelle's](https://x.com/jessfraz) [`dockerfiles/firefox`][1]
|
||||
- sourced from Mozilla's '[Install Firefox .deb package for Debian-based distributions][2]'
|
||||
|
||||
[1]: https://github.com/jessfraz/dockerfiles/tree/cc75d30bd79d7b2fe4e2f0f37cdc880979c9eefb/firefox
|
||||
[2]: https://support.mozilla.org/en-US/kb/install-firefox-linux#w_install-firefox-deb-package-for-debian-based-distributions-recommended
|
7
entrypoint.sh
Executable file
7
entrypoint.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -e /dev/snd ]]; then
|
||||
exec apulse firefox "$@"
|
||||
else
|
||||
exec firefox "$@"
|
||||
fi
|
34
local.conf
Normal file
34
local.conf
Normal file
@ -0,0 +1,34 @@
|
||||
<?xml version='1.0'?>
|
||||
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
|
||||
<fontconfig>
|
||||
<match target="font">
|
||||
<edit mode="assign" name="rgba">
|
||||
<const>rgb</const>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<edit mode="assign" name="hinting">
|
||||
<bool>true</bool>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<edit mode="assign" name="hintstyle">
|
||||
<const>hintslight</const>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<edit mode="assign" name="antialias">
|
||||
<bool>true</bool>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<edit mode="assign" name="lcdfilter">
|
||||
<const>lcddefault</const>
|
||||
</edit>
|
||||
</match>
|
||||
<match target="font">
|
||||
<edit name="embeddedbitmap" mode="assign">
|
||||
<bool>false</bool>
|
||||
</edit>
|
||||
</match>
|
||||
</fontconfig>
|
Loading…
x
Reference in New Issue
Block a user