-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
69 lines (58 loc) · 1.52 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
FROM debian:unstable-slim
LABEL maintainer="Backplane BV <[email protected]>"
# one of the names under /usr/share/i18n/SUPPORTED (e.g. es_MX or nl_BE)
ENV LANG=en_US.UTF-8
# one oe of the names under /usr/share/i18n/charmaps (e.g. ISO-8859-16)
ARG CHARSET=UTF-8
ARG AG="apt-get -yq --no-install-recommends"
ARG DEBIAN_FRONTEND=noninteractive
# Install Firefox
RUN set -eux; \
$AG update; \
$AG upgrade; \
$AG install --no-install-recommends \
ca-certificates \
firefox \
fonts-noto \
fonts-noto-cjk \
fonts-noto-color-emoji \
fonts-symbola \
hicolor-icon-theme \
libgl1 \
libglx-mesa0 \
libpulse0 \
locales \
; \
$AG clean; \
$AG autoremove; \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
~/.cache \
;
# Update locale
RUN set -eux; \
printf '%s %s\n' "$LANG" "$CHARSET" | tee /etc/locale.gen; \
locale-gen; \
/usr/sbin/update-locale;
# Install fontconfig
COPY ["fonts.conf", "/etc/fonts/local.conf"]
# Firefox prefs
RUN printf '%s\n' \
'pref("browser.tabs.remote.autostart", false);' \
>>/etc/firefox/syspref.js
# Add non-privileged user
RUN set -eux; \
groupadd -r user; \
useradd --no-log-init -r -g user -G audio,video user; \
mkdir -p /home/user/Downloads; \
chown -R user:user /home/user;
# Create the data directory so named/managed volumes get the right permissions
RUN set -eux; \
mkdir /data; \
chown user:user /data
# Run as non-privileged user
USER user
# Run firefox
COPY ["entrypoint.sh", "/"]
ENTRYPOINT [ "/entrypoint.sh" ]