-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
26 lines (25 loc) · 865 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
# Temporary fix Dockerfile for weird issues where build stage is skipped.
FROM emscripten/emsdk
RUN apt-get update && apt-get install cmake build-essential
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
RUN apt-get install -y nodejs
USER root
WORKDIR /usr/src/
RUN mkdir spareduck
WORKDIR /usr/src/spareduck
COPY www ./www
RUN cd www && npm install
COPY test ./test
COPY test.sh ./
COPY CMakeLists.txt ./
COPY src ./src
COPY include ./include
RUN rm -rf build/ && mkdir build
WORKDIR /usr/src/spareduck/build
RUN emcmake cmake .. && cmake --build . --target spareduck -j
WORKDIR /usr/src/spareduck
RUN cp build/spareduck.js ./www/ && mkdir -p ./www/dist && cp build/spareduck.wasm ./www/dist && cp build/spareduck.wasm ./www && cp ./www/index.html ./www/dist/
WORKDIR /usr/src/spareduck/www
RUN npm run build
EXPOSE 8080
CMD ["npm", "run", "serve"]