-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.build
More file actions
42 lines (30 loc) · 1.16 KB
/
Dockerfile.build
File metadata and controls
42 lines (30 loc) · 1.16 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Build stage
FROM rust:1.87-bookworm AS builder
WORKDIR /workspace
# Copy workspace Cargo files (includes patch.crates-io)
COPY Cargo.toml Cargo.lock ./
# Copy runbeam-sdk (needed for the patch)
COPY projects/runbeam-sdk ./projects/runbeam-sdk/
# Copy harmony-dsl (workspace member)
COPY projects/harmony-dsl ./projects/harmony-dsl/
# Copy harmony-proxy project files
COPY projects/harmony-proxy/Cargo.toml projects/harmony-proxy/Cargo.lock ./projects/harmony-proxy/
COPY projects/harmony-proxy/crates ./projects/harmony-proxy/crates/
COPY projects/harmony-proxy/src ./projects/harmony-proxy/src/
# Build from harmony-proxy directory
WORKDIR /workspace/projects/harmony-proxy
RUN cargo build --release --bin harmony
# Runtime stage
FROM debian:stable-slim
# Install minimal dependencies
RUN apt-get update && \
apt-get install -y ca-certificates && \
rm -rf /var/lib/apt/lists/*
# Create directories
RUN mkdir -p /etc/harmony /var/log/harmony /tmp/harmony
# Copy binary from builder
COPY --from=builder /workspace/target/release/harmony /usr/local/bin/harmony
# Expose ports
EXPOSE 8080 9090
# Default command
CMD ["harmony", "--config", "/etc/harmony/config.toml"]