-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathDockerfile.dev
More file actions
28 lines (23 loc) · 865 Bytes
/
Dockerfile.dev
File metadata and controls
28 lines (23 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Development Dockerfile for live editing with `cargo run`
FROM rust:1-bookworm
WORKDIR /workspace
# Install system deps commonly needed for Rust + TLS
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
pkg-config \
libssl-dev \
curl \
git \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Optional: install Stellar CLI (used by `starforge shell` sandbox execution)
# If the upstream install script changes, users can still use the container without it
RUN (curl -fsSL https://stellar.org/install.sh | bash) || true
# Pre-populate cargo registry cache for faster builds
# This is not required but speeds up first build
COPY Cargo.toml Cargo.lock ./
RUN mkdir -p src && \
echo "fn main() {}" > src/main.rs && \
cargo build --locked && \
rm -rf src
CMD ["cargo", "run", "--locked", "--"]