Exposed ports on dockerfile

This commit is contained in:
2026-03-03 17:40:42 +02:00
parent 0a0877dc4d
commit bcffc53708

View File

@@ -2,6 +2,10 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src WORKDIR /src
# expose ports
ENV ASPNETCORE_HTTP_PORTS=8081
EXPOSE 8081
# 1. Copy the .sln and .csproj files first to restore dependencies # 1. Copy the .sln and .csproj files first to restore dependencies
# This makes builds faster by caching the 'restore' layer # This makes builds faster by caching the 'restore' layer
COPY ["SampleApi/SampleApi.csproj", "SampleApi/"] COPY ["SampleApi/SampleApi.csproj", "SampleApi/"]