FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
LABEL maintainer="AgentDock"
LABEL version="1.0.0"
LABEL description="AgentDock Node Full - Comprehensive MCP Server"
WORKDIR /app
RUN sed -i 's/ports.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list && \
sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list
RUN apt-get update && apt-get install -y \
git curl wget bash net-tools \
python3 python3-pip nodejs npm \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
RUN mkdir -p ~/.pip && \
echo '[global]' > ~/.pip/pip.conf && \
echo 'index-url = https://mirrors.aliyun.com/pypi/simple/' >> ~/.pip/pip.conf && \
echo 'trusted-host = mirrors.aliyun.com' >> ~/.pip/pip.conf
RUN ARCH=$(uname -m) && \
if [ "$ARCH" = "x86_64" ]; then \
wget https://repo.anaconda.com/miniconda/Miniconda3-py311_25.3.1-1-Linux-x86_64.sh -O /tmp/miniconda.sh; \
elif [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then \
wget https://repo.anaconda.com/miniconda/Miniconda3-py310_25.3.1-1-Linux-aarch64.sh -O /tmp/miniconda.sh; \
else \
echo "Unsupported architecture: $ARCH"; exit 1; \
fi && \
bash /tmp/miniconda.sh -b -p /opt/conda && \
rm /tmp/miniconda.sh
ENV PATH="/opt/conda/bin:$PATH"
RUN conda init bash && \
echo "conda activate mcp-agent" >> ~/.bashrc
RUN npm install -g n && n lts && hash -r
RUN npm install -g pnpm typescript
COPY . /app/
SHELL ["/bin/bash", "-c"]
RUN conda create -n mcp-agent python=3.12 -y
RUN source /opt/conda/bin/activate mcp-agent && \
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple \
fastapi uvicorn httpx mcp openai toml \
python-dotenv rich asyncio sse-starlette \
json5 jsonschema httpx-sse uv \
&& echo "✅ Base packages installed in conda"
RUN source /opt/conda/bin/activate mcp-agent && \
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple mcp-server-calculator && \
echo "✅ mcp-server-calculator installed"
RUN source /opt/conda/bin/activate mcp-agent && \
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple mcp-simple-timeserver && \
echo "✅ mcp-simple-timeserver installed"
RUN npm install -g @modelcontextprotocol/server-github && \
echo "✅ server-github installed"
RUN npm install -g @modelcontextprotocol/server-slack && \
echo "✅ server-slack installed"
RUN npm install -g mcp-zotero && \
echo "✅ mcp-zotero installed"
RUN pip3 install --no-cache-dir \
fastapi uvicorn httpx mcp openai toml \
python-dotenv rich asyncio sse-starlette \
json5 jsonschema httpx-sse uv
RUN pip3 install /app/mcp_servers/read_file_enhanced && \
echo "✅ read-file-enhanced installed" && \
which read-file-enhanced
RUN pip3 install /app/mcp_servers/search-fusion-mcp && \
echo "✅ search-fusion-mcp installed" && \
which search-fusion-mcp
RUN cd /app/mcp_servers/mcp_code_executor && \
npm install && \
npm run build && \
echo "✅ mcp_code_executor built" && \
ls -la build/
RUN rm -rf /app/mcp_servers/concurrent-browser-mcp && \
cd /app/mcp_servers && \
git clone https://github.com/sailaoda/concurrent-browser-mcp.git concurrent-browser-mcp && \
cd concurrent-browser-mcp && \
npm install && \
npm run build && \
echo "✅ concurrent-browser-mcp built" && \
ls -la dist/
RUN cd /app/mcp_servers/concurrent-browser-mcp && \
npx playwright install chromium && \
npx playwright install-deps chromium && \
echo "✅ Playwright chromium installed"
RUN mkdir -p /app/ocr_files /app/pptx /app/docx
RUN cd /app/mcp_servers && \
git clone https://github.com/zcaceres/markdownify-mcp.git markdownify && \
cd markdownify && \
pnpm install && \
pnpm run build && \
echo "✅ markdownify installed"
RUN cd /app/mcp_servers && \
git clone https://github.com/MeterLong/MCP-Doc.git mcp-docx && \
source /opt/conda/bin/activate mcp-agent && \
cd mcp-docx && \
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple python-docx mcp && \
echo "✅ mcp-docx installed"
RUN cd /app/mcp_servers && \
git clone https://github.com/hanweg/mcp-pdf-tools.git pdf-tools && \
cd pdf-tools && \
uv sync && \
echo "✅ pdf-tools installed with dependencies pre-synced"
RUN cd /app/mcp_servers && \
git clone https://github.com/GongRzhe/Office-PowerPoint-MCP-Server.git office-powerpoint && \
source /opt/conda/bin/activate mcp-agent && \
cd office-powerpoint && \
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt && \
chmod +x ppt_mcp_server.py && \
echo "✅ office-powerpoint installed"
ENV PYTHONPATH=/app:$PYTHONPATH
ENV CODE_STORAGE_DIR=/app/code_storage
ENV CONDA_ENV_NAME=mcp-executor
ENV UV_PATH=/usr/local/bin/uv
ENV PATH="/usr/local/bin:/opt/conda/bin:$PATH"
RUN mkdir -p /app/mcp_server_logs /app/code_storage /app/data
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
EXPOSE 8000
EXPOSE 8088
ENTRYPOINT ["docker-entrypoint.sh"]