From 8f210a4f65901d778efdced362ff45ff33fcf2af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Zwoli=C5=84ski?= Date: Fri, 17 Nov 2023 22:11:58 +0100 Subject: [PATCH] chore: Add basic dockerfile for running node --- .dockerignore | 6 ++++++ Dockerfile | 23 +++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile 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..5e66cff7 --- /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 + + +FROM debian:bookworm-slim + +COPY --from=builder /build/target/release/lumina /usr/local/bin/lumina + +ENTRYPOINT ["lumina"] +CMD ["node"]