From 61132a3ac6c3c35bebc2f48b5353e9b0c6d6650a Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 12 Jun 2026 03:39:33 +0000 Subject: [PATCH] Update Dockerfile --- Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0b76e70..c9e8b00 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,28 +5,28 @@ # docker build -t mcp-time-tools . # docker run -p 8080:8080 mcp-time-tools # -# To pass a different script at build time: +# To build with a different script (e.g. from Gitea): # # 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. +# The script is always copied to /app/mcp_time_server.py +# and run from there, regardless of the source filename. FROM python:3.12-slim WORKDIR /app -# Default script name and location; can be overridden via --build-arg +# Allow overriding which file to copy (e.g. from Gitea), but always +# place it at a fixed path relative to Dockerfile root. 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} +# Copy script into a fixed, unambiguous path +COPY ${SCRIPT} /app/mcp_time_server.py # Expose HTTP port EXPOSE 8080 @@ -35,4 +35,4 @@ EXPOSE 8080 ENV PORT=8080 # Start the MCP time tools HTTP server -ENTRYPOINT ["python", "-u", "${SCRIPT_PATH}"] +ENTRYPOINT ["python", "-u", "/app/mcp_time_server.py"]