-
Notifications
You must be signed in to change notification settings - Fork 44
/
emscriptenDockerfile
59 lines (47 loc) · 1.7 KB
/
emscriptenDockerfile
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
FROM emscripten/emsdk:3.1.48
# Update and install req
RUN export DEBIAN_FRONTEND=noninteractive; \
export DEBCONF_NONINTERACTIVE_SEEN=true; \
echo 'tzdata tzdata/Areas select Etc' | debconf-set-selections; \
echo 'tzdata tzdata/Zones/Etc select UTC' | debconf-set-selections; \
apt-get update -qqy \
&& apt-get install -qqy --no-install-recommends gpg-agent software-properties-common \
&& echo '\
Package: *\n\
Pin: release o=LP-PPA-mozillateam\n\
Pin-Priority: 1001\
' | tee /etc/apt/preferences.d/mozilla-firefox \
&& add-apt-repository -y ppa:mozillateam/ppa \
&& apt-get install -qqy --no-install-recommends \
tzdata git firefox pkg-config xvfb \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
## preprare thirdparty
RUN mkdir /home/MeshLib
WORKDIR "/home/MeshLib"
#copy files
COPY . .
#build thirdparty
ENV MR_STATE=DOCKER_BUILD
ENV MR_EMSCRIPTEN=ON
RUN ./scripts/build_thirdparty.sh
RUN mkdir /usr/local/lib/emscripten/ && \
cp -r lib /usr/local/lib/emscripten/ && \
cp -r include /usr/local/lib/emscripten/
RUN rm -rf ./lib
ENV MR_EMSCRIPTEN_SINGLE=ON
RUN ./scripts/build_thirdparty.sh
RUN mkdir /usr/local/lib/emscripten-single/ && \
cp -r lib /usr/local/lib/emscripten-single/ && \
cp -r include /usr/local/lib/emscripten-single/
# install aws cli
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
sudo ./aws/install --bin-dir /usr/local/bin --install-dir /usr/local/aws-cli --update
WORKDIR "/home/"
RUN rm -rf MeshLib
# Add a new user "actions-runner" with user id 8877
RUN useradd -u 8877 -m user && \
sudo chmod -R 777 /emsdk/upstream/emscripten/
# Change to non-root privilege
USER user