This repository was archived by the owner on Feb 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change
1
+ FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
2
+ WORKDIR /app
3
+
4
+ # Copy csproj and restore as distinct layers
5
+ COPY /apimtemplate/*.csproj ./
6
+ RUN dotnet restore
7
+
8
+ # Copy everything else and build
9
+ COPY . ./
10
+ WORKDIR /app/apimtemplate
11
+ RUN dotnet publish apimtemplate.sln -c Release -o out
12
+
13
+ # Build runtime image
14
+ FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
15
+ WORKDIR /
16
+ COPY --from=build-env /app/apimtemplate/out .
Original file line number Diff line number Diff line change 1
1
<Project Sdk =" Microsoft.NET.Sdk" >
2
2
3
3
<PropertyGroup >
4
- <TargetFramework >netcoreapp2 .1</TargetFramework >
4
+ <TargetFramework >netcoreapp3 .1</TargetFramework >
5
5
6
6
<IsPackable >false</IsPackable >
7
7
Original file line number Diff line number Diff line change 2
2
3
3
<PropertyGroup >
4
4
<OutputType >Exe</OutputType >
5
- <TargetFramework >netcoreapp2 .1</TargetFramework >
5
+ <TargetFramework >netcoreapp3 .1</TargetFramework >
6
6
<ProjectGuid >{B5183465-2BC1-4206-9C9F-5AC9615AC941}</ProjectGuid >
7
7
<LangVersion >preview</LangVersion >
8
8
<PackAsTool >true</PackAsTool >
You can’t perform that action at this time.
0 commit comments