mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 10:44:36 +08:00
Create dockerfiles for the rustpython binary and wasm demo
This commit is contained in:
3 files changed
+30
No files matched your search
@@ -0,0 +1,2 @@
|
||||
target
|
||||
**/node_modules
|
||||
@@ -0,0 +1,9 @@
|
||||
FROM rust:1.31-slim
|
||||
|
||||
WORKDIR /rustpython
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN cargo build --release
|
||||
|
||||
CMD [ "/rustpython/target/release/rustpython" ]
|
||||
@@ -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" ]
|
||||
Reference in new issue
Block a user