diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..6f143b42 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +/.env +/.dockerignore +/.git* +/ci +/Dockerfile +/target diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..6e941262 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM rust:1.74 AS builder + +WORKDIR /build + +RUN apt-get update && \ + apt-get install -y protobuf-compiler && \ + apt-get clean + +RUN cargo install wasm-pack@0.12.1 --locked + +COPY . . + +RUN wasm-pack build --release --target web node-wasm + +RUN cargo build --release --bin lumina --features browser-node + + +FROM debian:bookworm-slim + +COPY --from=builder /build/target/release/lumina /usr/local/bin/lumina + +ENTRYPOINT ["lumina"] +CMD ["node"]