-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (43 loc) · 1.36 KB
/
Dockerfile
File metadata and controls
54 lines (43 loc) · 1.36 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
# Agentkernel multi-stage build for Kubernetes/Nomad deployment
#
# Builds agentkernel with orchestrator backends enabled, producing a
# minimal runtime image suitable for deployment as a K8s Deployment
# or Nomad service job.
#
# Build:
# docker build -t agentkernel .
#
# Run:
# docker run -p 18888:18888 agentkernel
# --- Builder stage ---
FROM rust:1.89-slim AS builder
WORKDIR /build
# Install build dependencies
RUN apt-get update && apt-get install -y \
pkg-config \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy manifests first for layer caching
COPY Cargo.toml Cargo.lock ./
# Copy source and directories referenced by include_str!()
COPY src ./src
COPY tests ./tests
COPY guest-agent ./guest-agent
COPY claude-plugin ./claude-plugin
COPY plugins ./plugins
COPY templates ./templates
COPY images/build ./images/build
COPY images/kernel/microvm.config ./images/kernel/microvm.config
# Build release binary with orchestrator features
RUN cargo build --release --features kubernetes,nomad
# --- Runtime stage ---
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y \
ca-certificates \
libssl3 \
&& rm -rf /var/lib/apt/lists/*
# Copy the compiled binary
COPY --from=builder /build/target/release/agentkernel /usr/local/bin/agentkernel
EXPOSE 18888
ENTRYPOINT ["agentkernel"]
CMD ["serve", "--host", "0.0.0.0", "--port", "18888"]