forked from xiaohei/taiji-AI-PAD
27 lines
972 B
Docker
27 lines
972 B
Docker
# Thin app image — relies on a pre-built base with pip deps already installed.
|
|
#
|
|
# Switch to this Dockerfile after the base image
|
|
# taiji.azurecr.io/mcp-server-base:py3.11-arm64-20260430
|
|
# is published. Subsequent builds become ~1-2 min instead of 40.
|
|
#
|
|
# When requirements.txt changes, rebuild Dockerfile.base first.
|
|
#
|
|
# Build:
|
|
# az acr build --registry taiji --image mcp-server:<tag> --image latest \
|
|
# --platform linux/arm64 --file Dockerfile.thin .
|
|
|
|
FROM taiji.azurecr.io/mcp-server-base:py3.11-arm64-20260430
|
|
|
|
WORKDIR /app
|
|
|
|
# Application code — the only frequently-changed layer
|
|
COPY . .
|
|
|
|
# Drop the prebuilt base Dockerfile to avoid confusion in the running container
|
|
RUN rm -f /app/Dockerfile.base /app/Dockerfile.thin
|
|
|
|
HEALTHCHECK --interval=120s --timeout=10s --start-period=40s --retries=3 \
|
|
CMD curl -f http://localhost:8000/health || exit 1
|
|
|
|
CMD ["python3", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1"]
|