File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # Build stage
21FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
32WORKDIR /src
4-
5- # Copy solution and project files
6- COPY quotes-analytics.sln .
73COPY quotes-analytics.csproj .
8-
9- # Restore dependencies
10- RUN dotnet restore quotes-analytics.sln
11-
12- # Copy source code (excluding tests via .dockerignore)
4+ RUN dotnet restore quotes-analytics.csproj
135COPY . .
14-
15- # Build and publish
166RUN dotnet publish quotes-analytics.csproj -c Release -o /app/publish --no-restore
177
18- # Runtime stage
198FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
209WORKDIR /app
21-
22- # Copy published app
2310COPY --from=build /app/publish .
24-
25- # Expose port
2611EXPOSE 8081
27-
28- # Set environment variables for OpenTelemetry
2912ENV ASPNETCORE_URLS=http://+:8081
3013ENV DOTNET_SYSTEM_NET_HTTP_SOCKETSHTTPHANDLER_HTTP2UNENCRYPTEDSUPPORT=true
31-
32- # Run the application
3314ENTRYPOINT ["dotnet" , "quotes-analytics.dll" ]
You can’t perform that action at this time.
0 commit comments