| FROM python:3.11-slim |
|
|
| RUN useradd -ms /bin/bash mcp |
|
|
| WORKDIR /app |
|
|
| RUN apt-get update && \ |
| apt-get install -y curl unzip && \ |
| curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \ |
| apt-get install -y nodejs && \ |
| apt-get clean |
|
|
| RUN curl -fsSL https://bun.sh/install | bash |
| ENV BUN_INSTALL="/root/.bun" |
| ENV PATH="${BUN_INSTALL}/bin:${PATH}" |
|
|
| RUN pip install --no-cache-dir mcpo uv |
|
|
| RUN npx playwright install --with-deps chrome |
|
|
| RUN mkdir -p /app/.cache/uv && \ |
| chown -R mcp:mcp /app/.cache |
| ENV XDG_CACHE_HOME="/app/.cache" |
|
|
| COPY . . |
|
|
| RUN chown -R mcp:mcp /app |
|
|
| USER mcp |
|
|
| EXPOSE 8000 |
|
|
| CMD ["sh", "-c", "echo \"$MCPO_CONFIG_JSON\" > /app/config.json && mcpo --config /app/config.json"] |