Archived
1
0

Add Docker support

This commit is contained in:
Serghei Cebotari 2023-11-14 14:14:42 +03:00
parent 4857c06630
commit 8035577277
2 changed files with 13 additions and 1 deletions

12
Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /app
COPY . ./
RUN dotnet restore
RUN dotnet publish -c Release -o out
FROM mcr.microsoft.com/dotnet/aspnet:7.0
EXPOSE 5000
WORKDIR /app
COPY --from=build /app/out .
ENV ASPNETCORE_ENVIRONMENT Production
ENTRYPOINT [ "dotnet", "MindBoxApi.dll", "--urls=http://0.0.0.0:5000" ]

View File

@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MindBoxApi", "MindboxApi\MindBoxApi.csproj", "{C94FA5F5-6E7A-4415-9C5B-51A5EF52408F}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MindBoxApi", "MindBoxApi\MindBoxApi.csproj", "{C94FA5F5-6E7A-4415-9C5B-51A5EF52408F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution