From 4cf99bcf38ca7947ed93c1aadf1b3d87c04b4453 Mon Sep 17 00:00:00 2001 From: Mike Nolan Date: Sat, 21 Jan 2023 02:35:21 -0600 Subject: [PATCH] Complete enough for initial deploy on my server --- Dockerfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3205214 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM mcr.microsoft.com/dotnet/sdk:6.0-focal AS build +WORKDIR /source +COPY . . +RUN dotnet restore "./Tesses.Backup.ServerConsole/Tesses.Backup.ServerConsole.csproj" --disable-parallel +RUN dotnet publish "./Tesses.Backup.ServerConsole/Tesses.Backup.ServerConsole.csproj" -c release -o /app --no-restore + +FROM mcr.microsoft.com/dotnet/runtime:6.0-focal +WORKDIR /app +COPY --from=build /app ./ +COPY --from=build /source/Tesses.Backup.ServerConsole/wwwroot /wwwroot/ +WORKDIR / + +EXPOSE 42990 +ENTRYPOINT [ "dotnet", "/app/Tesses.Backup.ServerConsole.dll" ] \ No newline at end of file