Files
mcp-microsoft/Dockerfile
T
Anu Thomas e3cee2541b Use trimmed azmcp for Docker (#423)
* Use trimmed azmcp for Docker

* revert to original mcr image
2025-09-12 12:29:11 -07:00

24 lines
702 B
Docker

# Build the runtime image
FROM mcr.microsoft.com/dotnet/aspnet:9.0.8-bookworm-slim AS runtime
# Add build argument for publish directory
ARG PUBLISH_DIR
# Error out if PUBLISH_DIR is not set
RUN if [ -z "$PUBLISH_DIR" ]; then \
echo "ERROR: PUBLISH_DIR build argument is required" && exit 1; \
fi
# Copy the contents of the publish directory to '/azuremcpserver' and set it as the working directory
RUN mkdir -p /azuremcpserver
COPY ${PUBLISH_DIR} /azuremcpserver/
WORKDIR /azuremcpserver
# List the contents of the current directory
RUN ls -la
RUN if [ ! -f "azmcp" ]; then \
echo "ERROR: azmcp executable does not exist" && exit 1; \
fi
ENTRYPOINT ["./azmcp", "server", "start"]