Skip to content

Commit

Permalink
Updated the target frameworks for the microservice example projects t…
Browse files Browse the repository at this point in the history
…o net6.0 to support the c# 10 requirement during build through the docker pipeline (#2677)
  • Loading branch information
ktmitton committed Nov 24, 2021
1 parent 9e83587 commit d7ea809
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/MicroserviceExample/WebApi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine AS build
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build

WORKDIR /app
COPY . ./
RUN dotnet publish ./examples/MicroserviceExample/WebApi -c Release -o /out -p:IntegrationBuild=true

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine AS runtime
FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine AS runtime
WORKDIR /app
COPY --from=build /out ./
ENTRYPOINT ["dotnet", "WebApi.dll"]
2 changes: 1 addition & 1 deletion examples/MicroserviceExample/WebApi/WebApi.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions examples/MicroserviceExample/WorkerService/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine AS build
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build

WORKDIR /app
COPY . ./
RUN dotnet publish ./examples/MicroserviceExample/WorkerService -c Release -o /out -p:IntegrationBuild=true

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine AS runtime
FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine AS runtime
WORKDIR /app
COPY --from=build /out ./
ENTRYPOINT ["dotnet", "WorkerService.dll"]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Worker">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit d7ea809

Please sign in to comment.