diff options
-rw-r--r-- | Dockerfile | 12 | ||||
-rw-r--r-- | MindBoxApi.sln | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8d0f9c8 --- /dev/null +++ b/Dockerfile @@ -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" ]
\ No newline at end of file diff --git a/MindBoxApi.sln b/MindBoxApi.sln index ed8e37e..70967cf 100644 --- a/MindBoxApi.sln +++ b/MindBoxApi.sln @@ -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 |