-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 1.17 KB
/
Copy pathDockerfile
File metadata and controls
32 lines (24 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Unity MCP Server v3.0.0 — pure .NET, no Unity DLLs required.
# Build and runtime stages for Windows, Linux, and macOS (stdio MCP).
# Build Stage
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
# Copy solution and project files first for better layer caching
COPY Unity-MCP-Server.sln ./
COPY UnityMcp.Core/UnityMcp.Core.csproj UnityMcp.Core/
COPY UnityMcp.Infrastructure/UnityMcp.Infrastructure.csproj UnityMcp.Infrastructure/
COPY UnityMcp.Application/UnityMcp.Application.csproj UnityMcp.Application/
COPY UnityMCP.Server/UnityMCP.Server.csproj UnityMCP.Server/
COPY UnityMcp.Tests/UnityMcp.Tests.csproj UnityMcp.Tests/
RUN dotnet restore Unity-MCP-Server.sln
# Copy all source (includes Application partials, Docs, etc.)
COPY . .
# Build and publish the server (no tests in image)
RUN dotnet publish UnityMCP.Server/UnityMCP.Server.csproj -c Release -o /app/publish --no-restore
# Runtime Stage
FROM mcr.microsoft.com/dotnet/runtime:10.0 AS final
WORKDIR /app
COPY --from=build /app/publish .
ENV DOTNET_ENVIRONMENT=Production
# MCP uses stdio; no port exposure. Hosts (Claude Desktop, Cursor) start this with stdio connected.
ENTRYPOINT ["dotnet", "UnityMCP.Server.dll"]