/
Airat
/
ASP.NET
Обзор
Документация
Войти
/
Airat
/
ASP.NET
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
UnitTests/src/Dockerfile
21 строка
643 B
Алексей Ягур
Updated UnitTests project docker
19 июл 2024, 23:11
19 июл 2024, 23:11
f8919b7
Код
Авторство
О чём код?
# Prepare the build stage FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /app # Copy the solution file and project files, then restore dependencies COPY *.sln . COPY */*.csproj ./ RUN for file in $(ls *.csproj); do mkdir -p ${file%.*} && mv $file ${file%.*}; done RUN dotnet restore # Copy the remaining files and publish the application COPY . ./aspnetapp WORKDIR /app/aspnetapp RUN dotnet publish -c Release -o out # Use the .NET 8 runtime for the final stage FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime WORKDIR /app COPY --from=build /app/aspnetapp/out ./ EXPOSE 8080 ENTRYPOINT ["dotnet", "PromoCodeFactory.WebHost.dll"]