-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.MCP-Server
More file actions
34 lines (27 loc) · 1.16 KB
/
Dockerfile.MCP-Server
File metadata and controls
34 lines (27 loc) · 1.16 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
FROM rockylinux:9.3
ARG PYTHON_VERSION=3.12
WORKDIR /app
# Install system dependencies including MySQL client libraries
RUN dnf install -y epel-release \
&& dnf install -y python${PYTHON_VERSION} python${PYTHON_VERSION}-pip git procps-ng lsof telnet screen iputils gcc python${PYTHON_VERSION}-devel libffi-devel openssl-devel nmap-ncat \
&& dnf install -y dnf-plugins-core \
&& dnf config-manager --set-enabled crb \
&& dnf clean all && dnf makecache \
&& dnf install -y mysql-devel mysql \
&& dnf clean all \
&& update-alternatives --install /usr/bin/python python /usr/bin/python${PYTHON_VERSION} 1000 --slave /usr/bin/pip pip /usr/bin/pip${PYTHON_VERSION}
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir \
'uv>=0.8.5' \
'mcpo>=0.0.17' \
'fastmcp>=2.12.3' \
'aiohttp>=3.12.0' \
'aiomysql>=0.2.0' \
'PyMySQL>=1.1.0'
# Copy application files
COPY . /app/
# Set environment variables for MySQL connections
ENV PYTHONPATH=/app/src
ENV PYTHONUNBUFFERED=1
CMD ["/bin/bash", "/app/scripts/mcp-server-docker-cmd.sh"]