# Dockerfile for MCP Time Tools HTTP Server # # Usage (from directory containing this Dockerfile and mcp_time_server.py): # # docker build -t mcp-time-tools . # docker run -p 8080:8080 mcp-time-tools # # To pass a different script at build time: # # docker build -t mcp-time-tools \ # --build-arg SCRIPT=mcp_time_server.py \ # --build-arg SCRIPT_PATH=/app/mcp_time_server.py \ # . # # Or mount an external script via a build context volume or multi-stage if needed. FROM python:3.12-slim WORKDIR /app # Default script name and location; can be overridden via --build-arg ARG SCRIPT=mcp_time_server.py ARG SCRIPT_PATH=/app/mcp_time_server.py # Install runtime dependency for ISO 8601 duration parsing RUN pip install --no-cache-dir python-dateutil # Copy the script into the container COPY ${SCRIPT} ${SCRIPT_PATH} # Expose HTTP port EXPOSE 8080 # Default port can be overridden at runtime with -e PORT=... ENV PORT=8080 # Start the MCP time tools HTTP server ENTRYPOINT ["python", "-u", "${SCRIPT_PATH}"]