forked from ARMmbed/mbed-simulator
-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
42 lines (30 loc) · 1.12 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
FROM node:16-slim
ENV PATH="${PATH}:/emsdk:/emsdk/fastcomp-clang/e1.38.21_64bit:/emsdk/emscripten/1.38.21"
ENV EMSDK="/emsdk"
ENV EM_CONFIG="/emsdk/.emscripten"
ENV EMSCRIPTEN="/emsdk/emscripten/1.38.21"
ENV EMSCRIPTEN_NATIVE_OPTIMIZER="/emsdk/fastcomp-clang/e1.38.21_64bit/optimizer"
ENV LLVM_ROOT="/emsdk/fastcomp-clang/e1.38.21_64bit"
ENV BINARYEN_ROOT="/emsdk/fastcomp-clang/e1.38.21_64bit/binaryen"
ENV EMSDK_NODE="/usr/bin/node"
ENV EMCC_WASM_BACKEND="0"
ENV EM_CACHE="/emsdk/emscripten/1.38.21/cache"
RUN apt-get update -qq && \
apt-get -qqy install \
cmake git python3-dev python3-pip npm
RUN python3 -m pip install mbed-cli mercurial
RUN git clone https://github.com/emscripten-core/emsdk
RUN ln -s /emsdk /usr/lib/emsdk
RUN npm update -g
RUN emsdk/emsdk install fastcomp-clang-e1.38.21-64bit && \
emsdk/emsdk activate fastcomp-clang-e1.38.21-64bit && \
emsdk/emsdk install emscripten-1.38.21 && \
emsdk/emsdk activate emscripten-1.38.21
ADD . /mbed-simulator
WORKDIR /mbed-simulator
RUN npm install
RUN npm audit fix || :
RUN npm audit fix || :
RUN npm run build-demos
EXPOSE 7829
CMD ["node", "server"]