diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2023-02-02 08:17:17 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2023-02-02 08:17:17 +0300 |
commit | 3f54d070e72955db80f410ba74a73846df1fbe09 (patch) | |
tree | e152549eb2a4256e8155970fef759ced65138967 /Dockerfile | |
parent | 591bf9056b86e0a4a94e8761d011a885c4b0b34c (diff) |
Add docker support
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..10afed7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +WORKDIR /app + +COPY . ./ +RUN dotnet restore +RUN dotnet tool restore +RUN dotnet ef database update +RUN dotnet publish -c Release -o out + +FROM mcr.microsoft.com/dotnet/aspnet:6.0 +EXPOSE 5000 +WORKDIR /app +COPY --from=build /app/out . +ENV ASPNETCORE_ENVIRONMENT Production +ENTRYPOINT [ "dotnet", "MyDarling.dll", "--urls=http://0.0.0.0:5000" ]
\ No newline at end of file |