1 parent d508d13 commit 3e3d28fCopy full SHA for 3e3d28f
3 files changed
.dockerignore
@@ -0,0 +1,2 @@
1
+target
2
+**/node_modules
Dockerfile.bin
@@ -0,0 +1,9 @@
+FROM rust:1.31-slim
+
3
+WORKDIR /rustpython
4
5
+COPY . .
6
7
+RUN cargo build --release
8
9
+CMD [ "/rustpython/target/release/rustpython" ]
Dockerfile.wasm
@@ -0,0 +1,19 @@
+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
10
11
12
13
+RUN cd ./wasm/lib/ && \
14
+ cargo build --release && \
15
+ cd ../demo && \
16
+ npm install && \
17
+ npm run dist
18
19
+CMD [ "serve", "/rustpython/wasm/demo/dist" ]
0 commit comments