Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dockerfile #461

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.git
.github
.gitignore

Dockerfile
timqi marked this conversation as resolved.
Show resolved Hide resolved
target
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM rust:bookworm AS builder

RUN apt-get update
RUN apt-get install -y build-essential libssl-dev pkg-config
RUN apt-get install -y protobuf-compiler libprotobuf-dev
RUN apt-get install -y clang-format clang-tidy \
clang-tools clang clangd libc++-dev \
libc++1 libc++abi-dev libc++abi1 \
libclang-dev libclang1 liblldb-dev \
libllvm-ocaml-dev libomp-dev libomp5 \
lld lldb llvm-dev llvm-runtime \
llvm python3-clang

RUN cargo install wasm-pack
RUN rustup target add wasm32-unknown-unknown

# TODO cache build dependencies
COPY . /rusty-kaspa
WORKDIR /rusty-kaspa
RUN cargo build --release


FROM debian:bookworm

COPY --from=builder /rusty-kaspa/target/release/kaspad /usr/bin/
COPY --from=builder /rusty-kaspa/target/release/kaspa-wallet /usr/bin/

CMD kaspad
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,22 @@ The framework is compatible with all major desktop and mobile browsers.
</details>


<details>
<summary>Building on Docker</summary>

You can also use Docker to build binaries.
```
docker build -t kaspa-rusty .
```

Then you can run kaspad using.
```
docker run --rm -it kaspa-rusty:latest
```

</details>


## Running the node

**Start a mainnet node**
Expand Down