-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathDockerfile.mcp
More file actions
26 lines (19 loc) · 753 Bytes
/
Copy pathDockerfile.mcp
File metadata and controls
26 lines (19 loc) · 753 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
# Dockerfile.mcp - MySQLTuner Daemon & MCP Server Microservice
FROM alpine:3.24@sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b
# Install Perl, Python 3, and MariaDB client (mysql client binary)
RUN apk add --no-cache perl python3 mariadb-client
# Set up working directory
WORKDIR /app
# Copy the MySQLTuner Perl script and MCP/Daemon wrapper
COPY mysqltuner.pl .
COPY build/mcp_server.py .
# Create cache directory
RUN mkdir -p /var/cache/mysqltuner
# Set environmental defaults
ENV CACHE_DIR=/var/cache/mysqltuner
ENV AUDIT_INTERVAL_HOURS=12
ENV READ_ONLY=false
# Expose standard volumes
VOLUME ["/var/cache/mysqltuner"]
# Run MCP server by default (which also spawns the daemon thread)
CMD ["python3", "mcp_server.py"]