Website Summary Files Commits Branches @commit @diff @stats
path: root / src
diff options
context:
space:
mode:
Commit05e59364505a4b02b7f925ef8cdaedb1fc8d14a9 (patch)
Author
 transtrike <transtrike@gmail.com>
2021-02-23 20:46:00 +0200
Committer
 transtrike <transtrike@gmail.com>
2021-02-23 20:46:00 +0200
Files1ab7b1866bdd6f2cdc419828733e934e403bb0e9 /src
DevHive-05e59364505a4b02b7f925ef8cdaedb1fc8d14a9.tar
DevHive-05e59364505a4b02b7f925ef8cdaedb1fc8d14a9.tar.gz
DevHive-05e59364505a4b02b7f925ef8cdaedb1fc8d14a9.zip
Parent1d2f0ea1665b6eb2d9cc3334841318a39ab41e0e (diff)
Docker file fixed
1 files changed, 8 insertions, 13 deletions
-rw-r--r--src/Dockerfile21
diff --git a/src/Dockerfile b/src/Dockerfile
index f99804c..0491463 100644
--- a/src/Dockerfile
+++ b/src/Dockerfile
@@ -1,16 +1,11 @@
-FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
-FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
-EXPOSE 80
+FROM mcr.microsoft.com/dotnet/sdk:5.0 AS sdk
-COPY . /app
-WORKDIR /app
+COPY . ./Build
+WORKDIR /Build
+RUN [ "dotnet", "publish", "-f", "net5.0", "-c", "Release", "Web/DevHive.Web/DevHive.Web.csproj", "-o", "/Out"]
-RUN dotnet restore
-RUN dotnet build -c Release -o /app/build
+FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS runtime
+COPY --from=sdk /Out /App
-FROM build AS publish
-RUN dotnet publish "DevHive.sln" -c Release -o /app/publish
-
-FROM base AS final
-COPY --from=publish /app/publish .
-ENTRYPOINT ["dotnet", "DevHive.Web.dll"]
+WORKDIR /App
+ENTRYPOINT [ "dotnet", "DevHive.Web.dll" ]