diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..d3c20f6 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +node_modules/ +.vs/ +bin/ +obj/ +azure-pipelines.yml +artifacts/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d0f542a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env + +# Copy everything +COPY . ./ + +RUN dotnet run --project ./tools/Build/Build.csproj deployment-package + +# Build runtime image +FROM mcr.microsoft.com/dotnet/aspnet:8.0 +COPY --from=build-env /artifacts . +ENTRYPOINT ["dotnet", "Twain.Web.dll"] \ No newline at end of file diff --git a/tools/Build/Build.csproj b/tools/Build/Build.csproj index bb0c2d8..05be39f 100644 --- a/tools/Build/Build.csproj +++ b/tools/Build/Build.csproj @@ -1,15 +1,15 @@ - - - - Exe - net7.0 - enable - enable - false - - - - - - - + + + + Exe + net8.0 + enable + enable + false + + + + + + +