Files
overleaf-mcp/Dockerfile
2026-04-13 13:45:38 +02:00

54 lines
2.3 KiB
Docker

FROM node:20-slim
# ---------------------------------------------------------------
# 1. System dependencies
# ---------------------------------------------------------------
RUN apt-get update && apt-get install -y \
git curl ca-certificates \
# Playwright / Chromium dependencies
libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 \
libxkbcommon0 libxcomposite1 libxdamage1 libxrandr2 libgbm1 \
libpango-1.0-0 libcairo2 libasound2 libatspi2.0-0 \
libxshmfence1 libx11-xcb1 libxcb-dri3-0 libxfixes3 \
# TeX Live (base + common resume packages)
texlive-latex-base texlive-latex-extra texlive-fonts-recommended \
texlive-fonts-extra texlive-latex-recommended \
&& rm -rf /var/lib/apt/lists/*
# ---------------------------------------------------------------
# 2. Install mcp-auth-proxy (OAuth 2.1 + stdio→HTTPS in one binary)
# ---------------------------------------------------------------
ARG MCP_AUTH_PROXY_VERSION=v2.5.3
RUN ARCH=$(dpkg --print-architecture) && \
curl -fsSL "https://github.com/sigbit/mcp-auth-proxy/releases/download/${MCP_AUTH_PROXY_VERSION}/mcp-auth-proxy_linux_${ARCH}" \
-o /usr/local/bin/mcp-auth-proxy && \
chmod +x /usr/local/bin/mcp-auth-proxy
# ---------------------------------------------------------------
# 3. Clone and build the Overleaf MCP server
# ---------------------------------------------------------------
WORKDIR /app
RUN git clone https://github.com/Sahith59/OverLeaf_MCP.git . \
&& npm install \
&& npm run build
# ---------------------------------------------------------------
# 4. Install Playwright Chromium browser
# ---------------------------------------------------------------
RUN npx playwright install chromium
# ---------------------------------------------------------------
# 5. Create data directories
# ---------------------------------------------------------------
RUN mkdir -p /data/resumes /data/output /root/.overleaf-mcp/browser-data
# ---------------------------------------------------------------
# 6. Expose HTTPS ports and start
# mcp-auth-proxy handles:
# - stdio → HTTP conversion
# - OAuth 2.1 authentication (GitHub/Google/OIDC/password)
# - Auto TLS via Let's Encrypt
# ---------------------------------------------------------------
EXPOSE 80 443
ENTRYPOINT ["mcp-auth-proxy"]