-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
47 lines (39 loc) · 1.71 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
ARG GROUP_ID=1001
ARG USER_ID=1001
FROM docker.io/techgk/arch:latest AS firefox
RUN pacman -Sy --disable-download-timeout --noconfirm \
firefox \
pulseaudio \
pulseaudio-alsa \
pulseaudio-bluetooth \
grep xdg-desktop-portal \
xorg-server \
xorg-apps \
ffmpeg \
mesa \
&& rm -rf /var/cache/pacman/pkg/* \
&& /bin/bash /root/skim.sh
ARG GROUP_ID
ARG USER_ID
COPY docker_files/entrypoint.sh /entrypoint.sh
RUN groupadd -g $GROUP_ID ff \
&& useradd -u $USER_ID -g $GROUP_ID -G audio,video -m ff \
&& chmod ugo+x /entrypoint.sh
COPY docker_files/pulse-client.conf /etc/pulse/client.conf
# Remove firefox system-wide hidden extensions and folders related to telemetry, download hardened user.js
RUN echo "default-server = unix:/run/user/${USER_ID}/pulse/native" >> /etc/pulse/client.conf \
&& rm /usr/lib/firefox/browser/features/*.xpi \
&& rm -rf /usr/lib/firefox/crashreporter \
&& rm -rf /usr/lib/firefox/minidump-analyzer \
&& rm -rf /usr/lib/firefox/pingsender \
&& wget https://github.com/arkenfox/user.js/archive/refs/tags/90.0.tar.gz -O 90.0.tar.gz \
&& tar -zxf 90.0.tar.gz \
&& echo '//' > /usr/lib/firefox/mozilla.cfg \
&& cat user.js-90.0/user.js | sed -e "s/user_pref/pref/g" >> /usr/lib/firefox/mozilla.cfg \
&& echo 'pref("general.config.obscure_value", 0);' >> /usr/lib/firefox/defaults/pref/local-settings.js \
&& echo 'pref("general.config.filename", "mozilla.cfg");' >> /usr/lib/firefox/defaults/pref/local-settings.js \
&& echo 'pref("ui.systemUsesDarkTheme", 1);' >> /usr/lib/firefox/defaults/pref/local-settings.js \
&& rm 90.0* && rm -r user.js*
USER ff
ENTRYPOINT ["/entrypoint.sh"]
CMD []