forked from alpadalar/ActiveDirectoryMCP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (37 loc) · 1.06 KB
/
Dockerfile
File metadata and controls
49 lines (37 loc) · 1.06 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
FROM python:3.11-slim
# Install system dependencies for LDAP
RUN apt-get update && apt-get install -y \
build-essential \
libldap2-dev \
libsasl2-dev \
libssl-dev \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements files
COPY requirements.in requirements-dev.in pyproject.toml ./
# Install UV for faster package management
RUN pip install uv
# Install dependencies
RUN uv venv && \
. .venv/bin/activate && \
uv pip install -r requirements.in
# Copy source code
COPY src/ ./src/
COPY setup.py ./
# Install the package
RUN . .venv/bin/activate && \
uv pip install -e .
# Create non-root user
RUN useradd -m -u 1000 aduser && \
chown -R aduser:aduser /app
USER aduser
# Set environment variables
ENV PYTHONPATH=/app/src
ENV AD_MCP_CONFIG=/app/ad-config/config.json
# Expose port
EXPOSE 8813
# Default command (can be overridden)
CMD ["/bin/bash", "-c", ". .venv/bin/activate && python -m active_directory_mcp.server_http --host 0.0.0.0 --port 8813 --path /activedirectory-mcp"]