Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,10 @@ dist
# Local working file
notes

selftests/test_runbook.yml
selftests/test_runbook.yml

# MCP local/temp files
mcp/tmp/
mcp/.env
mcp/**/*.log
mcp/test-results/
22 changes: 22 additions & 0 deletions mcp/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Build / packaging artifacts
**/__pycache__
**/*.pyc
**/*.pyo
**/*.egg-info
build/
dist/

# Virtualenvs and editor state
.venv/
venv/
.env
.env.*
.vscode/
.idea/

# Internal / local-only scripts and scratch files (gitignored)
tmp/

# Tests are still copied (used by smoke tests in CI), but exclude fixtures
# generated locally:
tests/__pycache__/
32 changes: 32 additions & 0 deletions mcp/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM python:3.12-slim

WORKDIR /app

# Install git (needed for repo clone)
RUN apt-get update && apt-get install -y --no-install-recommends git \
&& rm -rf /var/lib/apt/lists/*

# Clone the LISA repo
ARG LISA_BRANCH=main
RUN git clone --depth 1 --branch ${LISA_BRANCH} \
https://github.com/microsoft/lisa.git /app/lisa

# Overlay local MCP source so unpushed changes are included in the image
COPY . /app/lisa/mcp

# Install the MCP server package (with Azure blob download support)
RUN pip install --no-cache-dir "/app/lisa/mcp[azure]"

# Point the MCP server at the cloned repo
ENV LISA_REPO_ROOT=/app/lisa

# Drop privileges: run as a non-root user. /app must remain readable but
# writable areas (logs, downloads) are scoped to /home/mcp at runtime.
RUN useradd --create-home --shell /usr/sbin/nologin --uid 10001 mcp \
&& chown -R mcp:mcp /app
USER mcp

EXPOSE 8080

ENTRYPOINT ["lisa-mcp"]
CMD ["--transport", "sse", "--port", "8080"]
Comment on lines +1 to +32
Loading
Loading