-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (29 loc) · 1.25 KB
/
Dockerfile
File metadata and controls
41 lines (29 loc) · 1.25 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
FROM rust:1.88-bookworm AS builder
RUN apt-get update && apt-get install -y \
pkg-config libssl-dev git \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY Cargo.toml Cargo.lock ./
COPY src/ src/
COPY examples/ examples/
RUN cargo build --release --locked --examples && \
cargo build --release --locked --features "cli,ai_agent" --bin argus
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y \
ca-certificates libssl3 curl \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/target/release/argus /usr/local/bin/
COPY --from=builder /app/target/release/examples/sentinel_realtime_demo /usr/local/bin/
COPY --from=builder /app/target/release/examples/reentrancy_demo /usr/local/bin/
COPY --from=builder /app/target/release/examples/sentinel_dashboard_demo /usr/local/bin/
RUN mkdir -p /var/log/sentinel && \
groupadd -r argus && useradd -r -g argus argus && \
chown argus:argus /var/log/sentinel
USER argus
EXPOSE 9090
ENV ARGUS_RPC_URL=""
ENV ARGUS_METRICS_PORT="9090"
HEALTHCHECK --interval=30s --timeout=5s \
CMD curl -f http://localhost:${ARGUS_METRICS_PORT}/health || exit 1
ENTRYPOINT ["/bin/sh", "-c"]
CMD ["exec argus sentinel --rpc \"$ARGUS_RPC_URL\" --metrics-port \"$ARGUS_METRICS_PORT\" --prefilter-only"]