-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from hugo-dc/dockerfile
Add Dockerfile
- Loading branch information
Showing
2 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM ubuntu:18.04 | ||
|
||
# System deps | ||
RUN apt-get update | ||
RUN apt-get install -y build-essential curl git python cmake | ||
RUN apt-get install -y nodejs npm | ||
|
||
|
||
# Install Rust | ||
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y && . $HOME/.cargo/env | ||
ENV PATH=/root/.cargo/bin:$PATH | ||
RUN rustup default stable | ||
|
||
RUN rustup target add wasm32-unknown-emscripten | ||
RUN rustup target add asmjs-unknown-emscripten | ||
|
||
# Install Emscripten | ||
RUN git clone --depth 1 https://github.com/emscripten-core/emsdk.git | ||
RUN cd emsdk && ./emsdk install latest | ||
RUN cd emsdk && ./emsdk activate latest | ||
|
||
ENV PATH=/emsdk:/emsdk/upstream/emscripten:/emsdk/node/12.9.1_64bit/bin:$PATH | ||
ENV EMSDK=/emsdk | ||
ENV EM_CONFIG=/root/.emscripten | ||
ENV EMSDK_NODE=/emsdk/node/12.9.1_64bit/bin/node | ||
|
||
RUN cd emsdk && ./emsdk_env.sh | ||
|
||
WORKDIR /rustbn.js/ | ||
|
||
CMD /bin/bash | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters