-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
87 lines (76 loc) · 1.84 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# SPDX-License-Identifier: Apache-2.0
FROM fedora:38
LABEL maintainer="David Hendricks"
# uid and gid in container needs to match host owner of
# /tmp/.docker.xauth, so they must be passed as build arguments.
ARG UID
ARG GID
RUN yum update -y
RUN \
yum groupinstall -y "C Development Tools and Libraries" && \
yum groupinstall -y "GNOME Software Development"
# various other packages I think are needed for firefox...
RUN yum install -y \
alsa-lib \
alsa-lib-devel \
alsa-tools \
alternatives \
bindgen \
bzip2 \
clang \
dbus-glib-devel \
gcc \
glibc-static \
gtk3-devel \
libICE-devel \
libSM-devel \
libXcomposite-devel \
libXcursor-devel \
libXdamage-devel \
libXrandr-devel \
libXt-devel \
libXtst-devel \
libdrm-devel \
libstdc++-static \
libogg-devel \
m4 \
nasm \
ninja-build \
pango-devel \
perl \
perl-FindBin \
psutils \
pulseaudio-libs-devel \
python3-devel \
unzip \
watchman \
zstd
# Some unit tests need these
RUN yum install -y \
libpciaccess \
libpciaccess-devel \
pciutils \
pciutils-devel \
pciutils-devel-static \
pciutils-libs
# Needed to copy and patch Firefox sources
RUN yum install -y \
patch \
rsync
# Nice to have for debug mode, but not necessary
RUN yum install -y \
less \
vim
ADD "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/libclang_rt.builtins-wasm32-wasi-20.0.tar.gz" /tmp/wasi/
RUN \
tar zxf /tmp/wasi/*.tar.gz -C /tmp/wasi/ && \
mv /tmp/wasi/lib/wasi /usr/lib64/clang/16/lib/
RUN \
groupadd -g $GID firefox && \
useradd --create-home --uid $UID --gid $GID --comment="Firefox User" firefox
USER firefox
COPY --chown=firefox:firefox clone_firefox.sh /home/firefox/
COPY --chown=firefox:firefox mozconfigs/ /home/firefox/mozconfigs/
COPY --chown=firefox:firefox patches/ /home/firefox/patches/
COPY entrypoint.sh /sbin
ENTRYPOINT [ "/bin/sh", "/sbin/entrypoint.sh" ]