Skip to content

Commit 0940a59

Browse files
authored
adding dockerfile (#2)
1 parent 3fd0da4 commit 0940a59

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed

Dockerfile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
FROM rust:1.83-slim as builder
2+
3+
WORKDIR /usr/src/rustic-builder
4+
5+
# Install build dependencies
6+
RUN apt-get update && apt-get install -y \
7+
build-essential \
8+
pkg-config \
9+
libssl-dev \
10+
perl \
11+
cmake \
12+
libclang-dev \
13+
protobuf-compiler \
14+
&& rm -rf /var/lib/apt/lists/*
15+
16+
COPY . .
17+
RUN cargo build --release
18+
19+
FROM debian:bookworm-slim
20+
21+
RUN apt-get update && apt-get install -y --no-install-recommends \
22+
ca-certificates \
23+
libssl3 \
24+
&& rm -rf /var/lib/apt/lists/*
25+
26+
COPY --from=builder /usr/src/rustic-builder/target/release/rustic-builder /usr/local/bin/
27+
28+
EXPOSE 8560
29+
30+
ENTRYPOINT ["rustic-builder"]

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,35 @@ The name references both its implementation language (Rust) and its rustic natur
99

1010
## Installation
1111

12+
### From Source
1213
```
1314
cargo build --release
1415
```
1516

17+
### Using Docker
18+
```bash
19+
docker build -t rustic-builder .
20+
```
21+
1622
## Usage
1723

1824
Needs a fully synced ethereum node (Beacon node + Execution client)
1925

20-
Example usage
26+
### Running from Binary
2127
```
2228
./target/release/rustic-builder --execution-endpoint http://localhost:8551 --beacon-node http://localhost:5052 --jwt-secret jwt.hex --port 8560
2329
```
30+
31+
### Running with Docker
32+
```bash
33+
docker run -p 8560:8560 \
34+
-v /path/to/jwt.hex:/jwt.hex \
35+
rustic-builder \
36+
--execution-endpoint http://execution-client:8551 \
37+
--beacon-node http://beacon-node:5052
38+
```
39+
40+
Note: When running with Docker, make sure to:
41+
- Mount your JWT secret file
42+
- Use appropriate network settings (--network host if running nodes locally)
43+
- Adjust the execution/beacon endpoints to match your setup

0 commit comments

Comments
 (0)