forked from cryptogarageinc/cfd-js-wasm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (34 loc) · 1.24 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
FROM ghcr.io/cryptogarageinc/elements-testing:v0.2.5 as cfd_wasm_base
ARG EMSDK_VERSION=2.0.12
ARG NODE_VERSION=14.18.2
# install tzdata before git
USER root
RUN apt-get update && apt-get install -y tzdata
ENV TZ=Asia/Tokyo
RUN apt-get update && apt-get install -y \
csh \
clang \
clang-format \
ccache \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /emscripten && chmod 777 /emscripten && \
n $NODE_VERSION
WORKDIR /emscripten
RUN git clone https://github.com/emscripten-core/emsdk.git && \
cd /emscripten/emsdk && \
./emsdk install $EMSDK_VERSION && \
./emsdk activate $EMSDK_VERSION
FROM cfd_wasm_base as cfd_wasm_builder
ENV PATH /usr/local/bin:/emscripten/emsdk:/emscripten/emsdk/upstream/emscripten:/emscripten/emsdk/node/$NODE_VERSION_64bit/bin:$PATH
ENV EMSDK /emscripten/emsdk
ENV EM_CONFIG /emscripten/emsdk/.emscripten
ENV EM_CACHE /emscripten/emsdk/upstream/emscripten/cache
ENV EMSDK_NODE /emscripten/emsdk/node/$NODE_VERSION_64bit/bin/node
WORKDIR /emscripten
RUN chmod 755 /emscripten/emsdk/emsdk_env.sh && \
chmod 755 /emscripten/emsdk && \
node --version && cmake --version && clang --version && em++ --version && env
# RUN /emscripten/emsdk/emsdk_env.sh
USER testuser
CMD ["bash"]