1 | #Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed.
|
---|
2 | #For more information, please see https://aka.ms/containercompat
|
---|
3 |
|
---|
4 | FROM mcr.microsoft.com/dotnet/core/runtime:3.0-nanoserver-1809 AS base
|
---|
5 | WORKDIR /app
|
---|
6 |
|
---|
7 | FROM mcr.microsoft.com/dotnet/core/sdk:3.0-nanoserver-1809 AS build
|
---|
8 | WORKDIR /src
|
---|
9 | COPY ["HeuristicLab/3.3/HeuristicLab-3.3.csproj", "HeuristicLab/3.3/"]
|
---|
10 | COPY ["HeuristicLab.CommandLineInterface/HeuristicLab.CommandLineInterface.csproj", "HeuristicLab.CommandLineInterface/"]
|
---|
11 | COPY ["HeuristicLab.Common/3.3/HeuristicLab.Common-3.3.csproj", "HeuristicLab.Common/3.3/"]
|
---|
12 | COPY ["HeuristicLab.PluginInfrastructure/3.3/HeuristicLab.PluginInfrastructure-3.3.csproj", "HeuristicLab.PluginInfrastructure/3.3/"]
|
---|
13 | COPY ["HeuristicLab.DefinitionLanguage/HeuristicLab.DefinitionLanguage.csproj", "HeuristicLab.DefinitionLanguage/"]
|
---|
14 | COPY ["HeuristicLab.Core/3.3/HeuristicLab.Core-3.3.csproj", "HeuristicLab.Core/3.3/"]
|
---|
15 | COPY ["HeuristicLab.Persistence/3.3/HeuristicLab.Persistence-3.3.csproj", "HeuristicLab.Persistence/3.3/"]
|
---|
16 | COPY ["HeuristicLab.Tracing/3.3/HeuristicLab.Tracing-3.3.csproj", "HeuristicLab.Tracing/3.3/"]
|
---|
17 | COPY ["HeuristicLab.Common.Resources/3.3/HeuristicLab.Common.Resources-3.3.csproj", "HeuristicLab.Common.Resources/3.3/"]
|
---|
18 | COPY ["HeuristicLab.Collections/3.3/HeuristicLab.Collections-3.3.csproj", "HeuristicLab.Collections/3.3/"]
|
---|
19 | COPY ["HeuristicLab.DynamicAssemblyTestApp/HeuristicLab.DynamicAssemblyTestApp.csproj", "HeuristicLab.DynamicAssemblyTestApp/"]
|
---|
20 | COPY ["HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj", "HeuristicLab.Optimization/3.3/"]
|
---|
21 | COPY ["HeuristicLab.Data/3.3/HeuristicLab.Data-3.3.csproj", "HeuristicLab.Data/3.3/"]
|
---|
22 | COPY ["HeuristicLab.Parameters/3.3/HeuristicLab.Parameters-3.3.csproj", "HeuristicLab.Parameters/3.3/"]
|
---|
23 | COPY ["HeuristicLab.Operators/3.3/HeuristicLab.Operators-3.3.csproj", "HeuristicLab.Operators/3.3/"]
|
---|
24 | RUN dotnet restore "HeuristicLab/3.3/HeuristicLab-3.3.csproj"
|
---|
25 | COPY . .
|
---|
26 | WORKDIR "/src/HeuristicLab/3.3"
|
---|
27 | RUN dotnet build "HeuristicLab-3.3.csproj" -c Release -o /app
|
---|
28 |
|
---|
29 | FROM build AS publish
|
---|
30 | RUN dotnet publish "HeuristicLab-3.3.csproj" -c Release -o /app
|
---|
31 |
|
---|
32 | FROM base AS final
|
---|
33 | WORKDIR /app
|
---|
34 | COPY --from=publish /app .
|
---|
35 | ENTRYPOINT ["dotnet", "HeuristicLab-3.3.dll"] |
---|