-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (29 loc) · 1.25 KB
/
Copy pathDockerfile
File metadata and controls
30 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
# ---- Build ----
# Pinned to bookworm so glibc matches the bookworm runtime stage below.
FROM rust:1.89-slim-bookworm AS build
WORKDIR /src
COPY Cargo.toml Cargo.lock ./
COPY crates/ crates/
COPY apps/ apps/
RUN cargo build --release -p kremis -p kremis-mcp \
&& strip target/release/kremis target/release/kremis-mcp
# ---- Runtime ----
FROM debian:bookworm-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN groupadd -r kremis && useradd -r -g kremis kremis
COPY --from=build /src/target/release/kremis /usr/local/bin/kremis
COPY --from=build /src/target/release/kremis-mcp /usr/local/bin/kremis-mcp
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh \
&& mkdir -p /data && chown kremis:kremis /data
USER kremis
WORKDIR /data
EXPOSE 8080
VOLUME ["/data"]
HEALTHCHECK --interval=30s --timeout=3s CMD curl -f http://localhost:8080/health || exit 1
# Default: boot the embedded HTTP server and run the MCP stdio bridge in
# the foreground (suitable for `docker run -i` and MCP registry checks).
# To run only the HTTP API: `docker run --entrypoint kremis ... server -H 0.0.0.0 -D /data/kremis.db`.
ENTRYPOINT ["docker-entrypoint.sh"]