-
Notifications
You must be signed in to change notification settings - Fork 45
/
Dockerfile
27 lines (18 loc) · 695 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
FROM emscripten/emsdk:2.0.31 as builder
WORKDIR /usr/src/app
COPY . /usr/src/app/
RUN rm -rf build
RUN mkdir build && cd build && \
emcmake cmake .. && \
make
FROM nginx:1.25
WORKDIR /usr/share/nginx/html
COPY --from=builder /usr/src/app/build/examples/wasm/index.html .
COPY --from=builder /usr/src/app/build/examples/wasm/libmain.js .
COPY --from=builder /usr/src/app/build/examples/wasm/helpers.js .
COPY --from=builder /usr/src/app/build/examples/wasm/libmain.wasm .
COPY --from=builder /usr/src/app/build/examples/wasm/libmain.worker.js .
RUN rm /etc/nginx/conf.d/default.conf
COPY ./examples/wasm/nginx.conf /etc/nginx/conf.d/
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]