FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
LABEL maintainer="AgentDock"
LABEL version="1.0.0"
LABEL description="AgentDock Node Explore - Search & Analysis 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
COPY . /app/
RUN apt-get update && apt-get install -y \
git curl wget bash net-tools \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
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 apt-get update && apt-get install -y nodejs npm \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
RUN npm install -g n && n stable && hash -r
RUN npm install -g pnpm typescript ts-node
RUN pip3 install uv
RUN conda create -n mcp-agent python=3.12 -y && \
echo 'conda activate mcp-agent' >> ~/.bashrc
SHELL ["/bin/bash", "-c"]
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 source /opt/conda/bin/activate mcp-agent && \
pip install --resume-retries 20 \
python-dotenv rich asyncio fastapi uvicorn docker PyYAML motor gunicorn beanie psutil tenacity jinja2 json5 mcp openai jsonschema toml \
httpx httpx-sse sse-starlette \
&& echo "✅ mcp-agent base dependencies installed"
RUN source /opt/conda/bin/activate mcp-agent && \
pip install --resume-retries 20 \
beautifulsoup4 lxml markdownify markitdown mammoth \
pdfminer.six pdfplumber pypdf pypdfium2 camelot-py \
python-pptx openpyxl xlrd xlsxwriter \
pillow opencv-python-headless \
tiktoken magika onnxruntime \
SpeechRecognition pydub \
azure-ai-documentintelligence azure-core azure-identity \
numpy pandas tabulate regex \
requests chardet defusedxml tqdm typer coloredlogs \
youtube-transcript-api \
&& echo "✅ Document processing packages installed"
RUN conda create -n mcp-executor python=3.10 -y
RUN source /opt/conda/bin/activate mcp-executor && \
pip install --resume-retries 20 \
numpy pandas scipy matplotlib seaborn \
PyPDF2 PyMuPDF pdfminer.six pdfplumber pypdfium2 \
docx2txt python-docx python-pptx xlsxwriter \
beautifulsoup4 lxml \
geopy geopandas pyproj shapely pyshp \
requests httpx curl_cffi \
&& echo "✅ mcp-executor base packages installed"
RUN source /opt/conda/bin/activate mcp-executor && \
pip install --resume-retries 20 \
biopython pubchempy rdkit \
CoolProp \
python-chess chess stockfish \
yfinance networkx \
wbdata CensusData \
selenium waybackpy googletrans \
jsonlines pyld rdflib \
dateparser peewee pillow tabulate \
&& echo "✅ Scientific computing packages installed"
RUN mkdir -p /app/code_storage /app/filesystem /app/shared_input /app/mcp_server_logs
RUN source /opt/conda/bin/activate mcp-agent && \
cd /app/mcp_servers/read_file_enhanced && \
pip install -e .
RUN source /opt/conda/bin/activate mcp-agent && \
cd /app/mcp_servers/mcp_code_executor && \
npm install && npm run build
RUN source /opt/conda/bin/activate mcp-agent && \
cd /app/mcp_servers/search-mcp && \
pip install -e .
ENV PYTHONPATH=/app:${PYTHONPATH:-}
ENV CODE_STORAGE_DIR=/app/code_storage
ENV CONDA_ENV_NAME=mcp-executor
ENV UV_PATH=/usr/local/bin/uv
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
EXPOSE 8000
EXPOSE 8088
EXPOSE 7780
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]