-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (26 loc) · 1.22 KB
/
Copy pathDockerfile
File metadata and controls
36 lines (26 loc) · 1.22 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
33
34
35
36
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
# Copy solution and project files
COPY ["LocalLLMServerManager.slnx", "./"]
COPY ["LocalLLMServerManager.csproj", "./"]
COPY ["LocalLLMServerManager.Shared/LocalLLMServerManager.Shared.csproj", "LocalLLMServerManager.Shared/"]
COPY ["LocalLLMServerManager.Web/LocalLLMServerManager.Web.csproj", "LocalLLMServerManager.Web/"]
COPY ["LocalLLMServerManager.Tests/LocalLLMServerManager.Tests.csproj", "LocalLLMServerManager.Tests/"]
# Install WASM Workload
RUN dotnet workload install wasm-tools
# Restore dependencies
RUN dotnet restore "LocalLLMServerManager.slnx"
# Copy source code
COPY . .
# Build WASM UI and copy output to wwwroot
RUN dotnet publish "LocalLLMServerManager.Web/LocalLLMServerManager.Web.csproj" -c Release -o /app/wwwroot_wasm --nologo \
&& cp -r /app/wwwroot_wasm/wwwroot/* wwwroot/
# Publish Main Server App
RUN dotnet publish "LocalLLMServerManager.csproj" -c Release -o /app/publish --nologo /p:PublishSingleFile=false
# Runtime Image
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final
WORKDIR /app
ENV ASPNETCORE_URLS=http://0.0.0.0:5246
EXPOSE 5246
COPY --from=build /app/publish .
ENTRYPOINT ["dotnet", "LocalLLMServerManager.dll", "--service"]