2026-03-31 23:02:47 -04:00
|
|
|
FROM python:3.12-slim-bookworm
|
|
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
2026-03-31 23:25:10 -04:00
|
|
|
# Install OpenSSH client libs needed by asyncssh
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
|
libssl-dev \
|
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
2026-03-31 23:02:47 -04:00
|
|
|
COPY requirements.txt .
|
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
2026-03-31 23:25:10 -04:00
|
|
|
COPY ssh_mcp.py .
|
2026-03-31 23:02:47 -04:00
|
|
|
COPY entrypoint.py .
|
|
|
|
|
|
2026-03-31 23:25:10 -04:00
|
|
|
ENV PORT=8600
|
2026-03-31 23:02:47 -04:00
|
|
|
|
2026-03-31 23:25:10 -04:00
|
|
|
EXPOSE 8600
|
2026-03-31 23:02:47 -04:00
|
|
|
|
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s \
|
2026-03-31 23:25:10 -04:00
|
|
|
CMD python3 -c "import urllib.request; urllib.request.urlopen('http://localhost:8600/mcp', timeout=5)"
|
2026-03-31 23:02:47 -04:00
|
|
|
|
|
|
|
|
CMD ["python3", "entrypoint.py"]
|