Create dockerfiles for the rustpython binary and wasm demo

This commit is contained in:
coolreader18 committed 2019-01-02 18:57:27 -06:00
1 parent d508d130b6
commit 3e3d28fa1d
3 files changed
+30

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
target
**/node_modules
+9
View File
@@ -0,0 +1,9 @@
FROM rust:1.31-slim
WORKDIR /rustpython
COPY . .
RUN cargo build --release
CMD [ "/rustpython/target/release/rustpython" ]
+19
View File
@@ -0,0 +1,19 @@
FROM rust:1.31-slim
RUN apt-get update && apt-get install curl gnupg -y && \
curl -o- https://deb.nodesource.com/setup_10.x | bash && \
apt-get install nodejs -y && \
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh && \
npm i -g serve
WORKDIR /rustpython
COPY . .
RUN cd ./wasm/lib/ && \
cargo build --release && \
cd ../demo && \
npm install && \
npm run dist
CMD [ "serve", "/rustpython/wasm/demo/dist" ]