Upgrade to .net8

This commit is contained in:
Gervasio Marchand 2023-12-13 21:31:54 -03:00
parent 4ed3f24ff6
commit c5034a8e67
No known key found for this signature in database
GPG Key ID: B7736CB188DD0A38
5 changed files with 8 additions and 7 deletions

View File

@ -1,12 +1,12 @@
# syntax=docker/dockerfile:1
ARG ARCH=
FROM mcr.microsoft.com/dotnet/sdk:6.0.411-alpine3.18-${ARCH} AS builder
FROM mcr.microsoft.com/dotnet/sdk:8.0.100-1-alpine3.18-${ARCH} AS builder
WORKDIR /src
COPY src /src/
RUN dotnet publish -c Release /src/FakeRelay.sln -o /app
FROM mcr.microsoft.com/dotnet/aspnet:6.0.19-alpine3.18-${ARCH}
FROM mcr.microsoft.com/dotnet/aspnet:8.0.0-alpine3.18-${ARCH}
VOLUME ["/data"]
ENV CONFIG_PATH=/data/config.json
COPY --from=builder /app /app

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

View File

@ -4,12 +4,12 @@
<ProjectReference Include="..\FakeRelay.Core\FakeRelay.Core.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="prometheus-net.AspNetCore" Version="7.0.0" />
<ItemGroup>
<PackageReference Include="prometheus-net.AspNetCore" Version="8.2.0" />
</ItemGroup>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

View File

@ -12,6 +12,7 @@ Config.Init(builder.Configuration.GetValue<string>("CONFIG_PATH"));
// Add services to the container.
builder.Services.AddControllersWithViews();
builder.Services.AddHttpLogging(_ => { });
builder.Services.Configure<ForwardedHeadersOptions>(options =>
{