diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..a11978cb0 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +target +**/node_modules \ No newline at end of file diff --git a/Dockerfile.bin b/Dockerfile.bin new file mode 100644 index 000000000..5d48fd8e8 --- /dev/null +++ b/Dockerfile.bin @@ -0,0 +1,9 @@ +FROM rust:1.31-slim + +WORKDIR /rustpython + +COPY . . + +RUN cargo build --release + +CMD [ "/rustpython/target/release/rustpython" ] diff --git a/Dockerfile.wasm b/Dockerfile.wasm new file mode 100644 index 000000000..01137b3f9 --- /dev/null +++ b/Dockerfile.wasm @@ -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" ] \ No newline at end of file