26 lines
920 B
Docker
26 lines
920 B
Docker
FROM python:3.11-slim
|
|
ARG MCP_VERSION=0.2.0
|
|
ARG UID=1000
|
|
ARG GID=1000
|
|
RUN groupadd --system --gid ${GID} worker && \
|
|
adduser --system --gid ${GID} --uid ${UID} --home /home/worker worker
|
|
ENV PATH=/home/worker/.local/bin:$PATH
|
|
WORKDIR /home/worker
|
|
# Super user custom actions
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
curl \
|
|
tar \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
RUN curl -L https://gitea.com/gitea/gitea-mcp/releases/download/v${MCP_VERSION}/gitea-mcp_Linux_x86_64.tar.gz \
|
|
| tar -xz -C /usr/local/bin \
|
|
&& chmod +x /usr/local/bin/gitea-mcp
|
|
# End of super user custom actions
|
|
USER worker
|
|
RUN pip install mcpo uv
|
|
EXPOSE 8000
|
|
# Worker custom actions
|
|
ENV GITEA_HOST="https://gitea.com"
|
|
ENV GITEA_INSECURE="false"
|
|
ENV GITEA_ACCESS_TOKEN="<your personal access token>"
|
|
CMD ["uvx", "mcpo", "--host", "0.0.0.0", "--port", "8000", "--", "gitea-mcp"]
|
|
# End of worker custom actions |