File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ # Use Python 3.12.8-slim as the base image
2+ FROM python:3.12.8-slim
3+
4+ # Set environment variables
5+ ENV PYTHONDONTWRITEBYTECODE=1 \
6+ PYTHONUNBUFFERED=1 \
7+ PIP_NO_CACHE_DIR=off \
8+ PIP_DISABLE_PIP_VERSION_CHECK=on \
9+ PROJECT_PATH="/project"
10+
11+ # Install system dependencies
12+ RUN apt-get update && apt-get install -y --no-install-recommends \
13+ curl \
14+ git \
15+ build-essential \
16+ && curl -LO https://github.com/ast-grep/ast-grep/releases/latest/download/ast-grep-linux-x64.tar.gz \
17+ && tar -xzf ast-grep-linux-x64.tar.gz \
18+ && mv sg /usr/local/bin/ast-grep \
19+ && chmod +x /usr/local/bin/ast-grep \
20+ && rm ast-grep-linux-x64.tar.gz \
21+ && apt-get clean \
22+ && rm -rf /var/lib/apt/lists/*
23+
24+ # Create a directory for the project mount
25+ RUN mkdir -p /project
26+
27+ # Set working directory
28+ WORKDIR /app
29+
30+ # Clone the repository (replace with your actual repository URL)
31+ RUN git clone https://github.com/yourusername/code-analysis-mcp-server.git . \
32+ && pip install --no-cache-dir -e .
33+
34+ # Expose the port for the MCP server
35+ EXPOSE 8000
36+
37+ # Create a volume for the project
38+ VOLUME ["/project" ]
39+
40+ # Command to run the server
41+ ENTRYPOINT ["code-analysis-server" ]
You can’t perform that action at this time.
0 commit comments