-
-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathDockerfile.emscripten
37 lines (27 loc) · 1.16 KB
/
Dockerfile.emscripten
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
FROM ubuntu:22.04 AS base
# add setup-cpp https://github.com/aminya/setup-cpp
RUN apt-get update && apt-get install -y \
npm \
&& rm -rf /var/lib/apt/lists/*
RUN npm install -g setup-cpp
FROM base AS setup
# install cmake, ninja, and ccache
RUN setup-cpp --cmake true --ninja true --ccache true --cppcheck true --vcpkg true --conan true --task true
# install emscripten
# Get the emsdk repo
RUN git clone https://github.com/emscripten-core/emsdk.git /root/emsdk
# Download and install the latest SDK tools.
RUN /root/emsdk/emsdk install latest
# Make the "latest" SDK "active" for the current user. (writes .emscripten file)
RUN /root/emsdk/emsdk activate latest
# Get emscripten repo, for Emscripten.cmake
RUN git clone https://github.com/emscripten-core/emscripten /root/emscripten
ENV EMSCRIPTEN /root/emscripten
#RUN touch /root/.bash_profile && echo 'source "/root/emsdk/emsdk_env.sh"' >> /root/.bash_profile
COPY ./docker/entrypoint.emscripten.sh /docker-entrypoint.sh
ENTRYPOINT [ "/docker-entrypoint.sh" ]
FROM setup AS build
COPY . /home/project_options
WORKDIR /home/project_options
RUN git submodule update --init
CMD ["/bin/bash", "-c", "task emscripten:build"]