-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.dev
More file actions
69 lines (54 loc) · 2.22 KB
/
Copy pathDockerfile.dev
File metadata and controls
69 lines (54 loc) · 2.22 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Development Dockerfile for agentic-mgmt (Rust)
# Includes development tools and a simple runtime image
# Current public CA bootstrap for verified Debian index retrieval (#679).
FROM node:20@sha256:8f693eaa7e0a8e71560c9a82b55fd54c2ae920a2ba5d2cde28bac7d1c01c9ba5 AS ca-bootstrap
# Digest pinned per ci/digests.txt (issue #262). Bumped 1.76 → 1.88 to consolidate
# Rust toolchain across all Dockerfiles in this repo.
FROM rust:1.88-bookworm@sha256:af306cfa71d987911a781c37b59d7d67d934f49684058f96cf72079c3626bfe0 AS builder
ARG CARGO_BUILD_JOBS=8
# Install build dependencies
COPY --from=ca-bootstrap /etc/ssl/certs/ /etc/ssl/certs/
COPY scripts/prepare-debian-apt-https.sh /tmp/prepare-debian-apt-https.sh
RUN sh /tmp/prepare-debian-apt-https.sh \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
git \
make \
&& rm -f /tmp/prepare-debian-apt-https.sh \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy source code
COPY management/ management/
# Build binary
WORKDIR /app/management
RUN case "$CARGO_BUILD_JOBS" in ''|*[!0-9]*|0) exit 2 ;; esac \
&& cargo build --jobs "$CARGO_BUILD_JOBS" --release
# Digest pinned per ci/digests.txt (issue #262).
FROM debian:bookworm-slim@sha256:67b30a61dc87758f0caf819646104f29ecbda97d920aaf5edc834128ac8493d3
# Install runtime dependencies
COPY --from=ca-bootstrap /etc/ssl/certs/ /etc/ssl/certs/
COPY scripts/prepare-debian-apt-https.sh /tmp/prepare-debian-apt-https.sh
RUN sh /tmp/prepare-debian-apt-https.sh \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
tini \
&& rm -f /tmp/prepare-debian-apt-https.sh \
&& rm -rf /var/lib/apt/lists/*
# Create non-root user
RUN useradd -m -u 1000 sandbox
# Copy binary from builder
COPY --from=builder /app/management/target/release/agentic-mgmt /usr/local/bin/agentic-mgmt
# Create required directories
RUN mkdir -p /var/lib/agentic-sandbox/secrets && \
chown -R sandbox:sandbox /var/lib/agentic-sandbox
USER sandbox
WORKDIR /app
EXPOSE 8120 8121 8122
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8122/health || exit 1
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["agentic-mgmt"]