forked from janjongboom/mbed-simulator
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Dockerfile
31 lines (23 loc) · 1008 Bytes
/
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
FROM node:12.14-slim
ENV PATH="/emsdk:/emsdk/emscripten/tag-1.38.21:${PATH}"
ENV EMSDK="/emsdk"
ENV EM_CONFIG="/root/.emscripten"
ENV EMSCRIPTEN="/emsdk/emscripten/tag-1.38.21"
ENV EMSCRIPTEN_NATIVE_OPTIMIZER="/emsdk/emscripten/tag-1.38.21_64bit_optimizer/optimizer"
RUN apt-get update -qq && apt-get -qqy install \
cmake git curl unzip net-tools python-dev python-pip && \
pip install mbed-cli mercurial
ENV EMSDK_REVISION="50df5a2983d1b793f189c674ad588d8df5f9b2f4"
RUN curl -LO https://github.com/emscripten-core/emsdk/archive/${EMSDK_REVISION}.zip && \
unzip ${EMSDK_REVISION}.zip && \
mv emsdk-${EMSDK_REVISION} emsdk
RUN emsdk/emsdk install fastcomp-clang-e1.38.21-64bit && \
emsdk/emsdk activate fastcomp-clang-e1.38.21-64bit && \
emsdk/emsdk install emscripten-tag-1.38.21-64bit && \
emsdk/emsdk activate emscripten-tag-1.38.21-64bit
ADD . /app
WORKDIR /app
ENV DEMOS_DIRECTORY="demos"
RUN npm install && npm run build-demos
EXPOSE 7829
CMD ["npm", "run", "start"]