Update build target to .NET 8 (#43)

This commit is contained in:
Daniel J. Summers 2024-06-19 22:22:22 -04:00
parent 41c3904e85
commit 43378ed53b
2 changed files with 7 additions and 7 deletions

View File

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine AS build FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
WORKDIR /jjj WORKDIR /jjj
COPY ./JobsJobsJobs.sln ./ COPY ./JobsJobsJobs.sln ./
COPY ./JobsJobsJobs/Directory.Build.props ./JobsJobsJobs/ COPY ./JobsJobsJobs/Directory.Build.props ./JobsJobsJobs/
@ -14,13 +14,13 @@ RUN dotnet restore
COPY . ./ COPY . ./
WORKDIR /jjj/JobsJobsJobs/Application WORKDIR /jjj/JobsJobsJobs/Application
RUN dotnet publish -c Release -r linux-x64 RUN dotnet publish -c Release -r linux-x64
RUN rm bin/Release/net7.0/linux-x64/publish/appsettings.*.json RUN rm bin/Release/net8.0/linux-x64/publish/appsettings.*.json
FROM mcr.microsoft.com/dotnet/aspnet:7.0-alpine as final FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine as final
WORKDIR /app WORKDIR /app
RUN apk add --no-cache icu-libs RUN apk add --no-cache icu-libs
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
COPY --from=build /jjj/JobsJobsJobs/Application/bin/Release/net7.0/linux-x64/publish/ ./ COPY --from=build /jjj/JobsJobsJobs/Application/bin/Release/net8.0/linux-x64/publish/ ./
EXPOSE 80 EXPOSE 80
CMD [ "dotnet", "/app/JobsJobsJobs.Application.dll" ] CMD [ "dotnet", "/app/JobsJobsJobs.Application.dll" ]

View File

@ -1,10 +1,10 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<DebugType>embedded</DebugType> <DebugType>embedded</DebugType>
<GenerateDocumentationFile>false</GenerateDocumentationFile> <GenerateDocumentationFile>false</GenerateDocumentationFile>
<AssemblyVersion>3.1.2.0</AssemblyVersion> <AssemblyVersion>3.2.0.0</AssemblyVersion>
<FileVersion>3.1.2.0</FileVersion> <FileVersion>3.2.0.0</FileVersion>
</PropertyGroup> </PropertyGroup>
</Project> </Project>