diff --git a/phase2/Dockerfile b/phase2/Dockerfile new file mode 100644 index 0000000..d6b120d --- /dev/null +++ b/phase2/Dockerfile @@ -0,0 +1,18 @@ +FROM rust:slim as builder +RUN apt-get update && \ + apt-get install -y pkg-config libssl-dev curl && \ + rm -rf /var/lib/apt/lists/* +RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh +WORKDIR /build +COPY . . + +WORKDIR /build/phase2 +RUN mkdir bin +RUN cargo build --release --bins +RUN find ./target/release/ -maxdepth 1 -type f -perm /a+x -exec mv {} /build/phase2/bin/ \; +RUN wasm-pack build --release --target web -- --no-default-features --features wasm + +FROM debian:buster-slim +COPY --from=builder /build/phase2/bin/* /usr/bin/ +COPY --from=builder /build/phase2/pkg/* /wasm/ +WORKDIR /data \ No newline at end of file diff --git a/powersoftau/Dockerfile b/powersoftau/Dockerfile new file mode 100644 index 0000000..8fb0ef5 --- /dev/null +++ b/powersoftau/Dockerfile @@ -0,0 +1,14 @@ +FROM rust:slim as builder +RUN apt-get update && \ + apt-get install -y pkg-config libssl-dev && \ + rm -rf /var/lib/apt/lists/* +WORKDIR /build +COPY . . +RUN mkdir bin +RUN cd powersoftau && \ + cargo build --release --bins && \ + find ./target/release/ -maxdepth 1 -type f -perm /a+x -exec mv {} /build/bin/ \; + +FROM debian:buster-slim +COPY --from=builder /build/bin/* /usr/bin/ +WORKDIR /data \ No newline at end of file