-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (28 loc) · 924 Bytes
/
Dockerfile
File metadata and controls
38 lines (28 loc) · 924 Bytes
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
# Use Python 3.12 slim image as base
FROM python:3.12-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc curl ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Install uv
RUN pip install --no-cache-dir uv
# Copy the entire project first for installation
COPY . .
# Install the package and its dependencies
RUN uv pip install --system --no-cache-dir -e .
# Create non-root user
RUN useradd -m -u 1000 appuser && chown -R appuser:appuser /app
# Expose the port the app runs on
EXPOSE 8000
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV FASTMCP_HOST=0.0.0.0
ENV FASTMCP_PORT=8000
ENV ROOTLY_TRANSPORT=both
ENV ROOTLY_LOG_LEVEL=INFO
# Switch to non-root user
USER appuser
# Run the application
CMD ["sh", "-c", "rootly-mcp-server --transport \"$ROOTLY_TRANSPORT\" --log-level \"$ROOTLY_LOG_LEVEL\" --hosted"]