Files
mcp-microsoft/Dockerfile
T
vcolin7 bf12ccf97b Prepare release for version 0.8.5 (#732)
* Update CHANGELOGs

* Updated tools and prompts markdown files

* Added one more CHANGELOG entry

* Fixed typos

* Updated CHANGELOG one more time
2025-10-07 23:40:54 +00:00

30 lines
829 B
Docker

# Build the runtime image
FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine 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
RUN apk add --no-cache libc6-compat
# 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
# Ensure the main binary exists and is executable
RUN if [ ! -f "azmcp" ]; then \
echo "ERROR: azmcp executable does not exist" && exit 1; \
fi \
&& chmod +x azmcp \
&& test -x azmcp
ENTRYPOINT ["./azmcp", "server", "start"]