Add dockerfile

This commit is contained in:
2024-05-24 22:44:17 -05:00
parent 1063a60814
commit ee1e25ccec
3 changed files with 32 additions and 15 deletions

6
.dockerignore Normal file
View File

@@ -0,0 +1,6 @@
node_modules/
.vs/
bin/
obj/
azure-pipelines.yml
artifacts/

11
Dockerfile Normal file
View File

@@ -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"]

View File

@@ -2,14 +2,14 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Faithlife.Build" Version="5.20.0" /> <PackageReference Include="Faithlife.Build" Version="5.20.2" />
</ItemGroup> </ItemGroup>
</Project> </Project>