forked from rudof-project/rudof
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (31 loc) · 1.15 KB
/
Copy pathDockerfile
File metadata and controls
44 lines (31 loc) · 1.15 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
# Dockerfile for rudof MCP server
# Optimized for Docker MCP Registry
FROM clux/muslrust:latest AS builder
WORKDIR /app
# Copy source code
COPY . .
# Build the rudof CLI binary (which includes the MCP server)
RUN cargo build --target x86_64-unknown-linux-musl --release -p rudof_cli
# Runtime image with Java and PlantUML
FROM eclipse-temurin:21-jre-alpine
# Install PlantUML
ARG PLANTUML_VERSION=1.2024.8
RUN mkdir -p /opt/plantuml && \
wget -q -O /opt/plantuml/plantuml.jar \
"https://github.com/plantuml/plantuml/releases/download/v${PLANTUML_VERSION}/plantuml-${PLANTUML_VERSION}.jar"
# Install graphviz for PlantUML diagrams
RUN apk add --no-cache graphviz fontconfig ttf-dejavu
# Set environment variables
ENV RUST_LOG="info,rudof_mcp=debug"
ENV PLANTUML="/opt/plantuml/plantuml.jar"
# Copy the binary from builder
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/rudof /usr/local/bin/rudof
# Create persistent state directory
RUN mkdir -p /app/state && chmod 777 /app/state
# Switch to non-root user
USER 1000:1000
# Declare VOLUME for state persistence
VOLUME ["/app/state"]
# MCP server entrypoint
ENTRYPOINT ["rudof"]
CMD ["mcp"]