From e5113468d62823f70437a42165a30e14be111efb Mon Sep 17 00:00:00 2001 From: Drew Tada Date: Mon, 24 Feb 2025 08:48:42 -0700 Subject: [PATCH] WIP: building via docker --- .dockerignore | 20 ++++++++++++++++++++ Dockerfile | 28 ++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..1624de10 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,20 @@ +# Rust build artifacts +target/ +**/*.rs.bk + +# Git directory +.git/ + +# IDE directories +.idea/ +.vscode/ + +# Dependencies +node_modules/ + +# Debug files +**/*.pdb + +# Temporary files +**/*.tmp +**/*.temp \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..a8d99cd6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,28 @@ +FROM --platform=linux/amd64 rust:1.82.0-bullseye + +# Install build dependencies +RUN apt-get update && apt-get install -y \ + build-essential \ + pkg-config \ + libclang-dev \ + clang \ + curl \ + && rm -rf /var/lib/apt/lists/* + +# Create and set working directory +WORKDIR /kailua + +# Copy all files (except those in .gitignore) +COPY . . + +# Install RISC0 toolchain +RUN curl -L https://risczero.com/install | bash && \ + . $HOME/.bashrc && \ + export PATH="$HOME/.rzup/bin:$PATH" && \ + rzup install + +# Build the CLI +RUN cargo install kailua-cli --path bin/cli --locked --debug + +# Set the entrypoint to the CLI +ENTRYPOINT ["kailua-cli"] \ No newline at end of file