-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (19 loc) · 781 Bytes
/
Copy pathDockerfile
File metadata and controls
25 lines (19 loc) · 781 Bytes
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
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
COPY ["MSSQLPlanViewer.sln", "./"]
COPY ["src/MSSQLPlanViewer.Core/MSSQLPlanViewer.Core.csproj", "src/MSSQLPlanViewer.Core/"]
COPY ["src/MSSQLPlanViewer.Web/MSSQLPlanViewer.Web.csproj", "src/MSSQLPlanViewer.Web/"]
COPY ["tests/MSSQLPlanViewer.Core.Tests/MSSQLPlanViewer.Core.Tests.csproj", "tests/MSSQLPlanViewer.Core.Tests/"]
RUN dotnet restore "./MSSQLPlanViewer.sln"
COPY . .
RUN dotnet publish "./src/MSSQLPlanViewer.Web/MSSQLPlanViewer.Web.csproj" \
-c Release \
--no-restore \
-o /app/publish
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
WORKDIR /app
ENV ASPNETCORE_URLS=http://+:5293
EXPOSE 5293
COPY --from=build /app/publish .
USER app
ENTRYPOINT ["dotnet", "MSSQLPlanViewer.Web.dll"]