Skip to content

Commit 8f0ec82

Browse files
authored
Merge pull request #63 from okeoyebade-del/feature/docker
feat: add Docker container support
2 parents 5d096de + d62b594 commit 8f0ec82

4 files changed

Lines changed: 61 additions & 1 deletion

File tree

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
target
2+
.git
3+
.github
4+
tests
5+
*.wasm

Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# syntax=docker/dockerfile:1
2+
FROM rust:1.85-bookworm AS builder
3+
4+
WORKDIR /app
5+
COPY Cargo.toml ./
6+
COPY src ./src
7+
8+
RUN cargo build --release
9+
10+
FROM debian:bookworm-slim
11+
12+
RUN apt-get update \
13+
&& apt-get install -y --no-install-recommends ca-certificates \
14+
&& rm -rf /var/lib/apt/lists/*
15+
16+
COPY --from=builder /app/target/release/soroban-debug /usr/local/bin/soroban-debug
17+
18+
WORKDIR /contracts
19+
ENV RUST_LOG=soroban_debugger=info
20+
ENTRYPOINT ["soroban-debug"]

Readme.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,4 +303,30 @@ at your option.
303303

304304
## Acknowledgments
305305

306-
Built for the Stellar ecosystem to improve the Soroban smart contract development experience.
306+
Built for the Stellar ecosystem to improve the Soroban smart contract development experience.
307+
308+
## Docker
309+
310+
### Build Locally
311+
312+
```bash
313+
docker build -t soroban-debugger:local .
314+
```
315+
316+
### Run with a Mounted WASM
317+
318+
```bash
319+
docker run --rm -v "$(pwd):/contracts" ghcr.io/your-org/soroban-debug run --contract /contracts/token.wasm --function transfer
320+
```
321+
322+
### Interactive Mode (TTY)
323+
324+
```bash
325+
docker run --rm -it -v "$(pwd):/contracts" ghcr.io/your-org/soroban-debug interactive --contract /contracts/token.wasm
326+
```
327+
328+
### Docker Compose
329+
330+
```bash
331+
docker compose run --rm soroban-debug run --contract /contracts/token.wasm --function transfer
332+
```

docker-compose.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
services:
2+
soroban-debug:
3+
image: ghcr.io/your-org/soroban-debug:latest
4+
build: .
5+
working_dir: /contracts
6+
volumes:
7+
- ./:/contracts
8+
stdin_open: true
9+
tty: true

0 commit comments

Comments
 (0)