Skip to content

Commit

Permalink
refactor: 🎨 move code into shared projects
Browse files Browse the repository at this point in the history
To support Duende with minimum code modification

BREAKING CHANGE: Duende IdentitiyServer
  • Loading branch information
github-actions committed Sep 5, 2021
1 parent 1f75a01 commit 4640601
Show file tree
Hide file tree
Showing 187 changed files with 2,844 additions and 1,253 deletions.
349 changes: 332 additions & 17 deletions TheIdServer.sln

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\IdentityServer\Aguacongas.IdentityServer\Aguacongas.IdentityServer.csproj" />
<ProjectReference Include="..\..\src\IdentityServer\IS4\Aguacongas.IdentityServer.IS4\Aguacongas.IdentityServer.IS4.csproj" />
</ItemGroup>

</Project>
117 changes: 117 additions & 0 deletions src/Aguacongas.TheIdServer.Duende/Aguacongas.TheIdServer.Duende.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<UserSecretsId>51a7f0be-96e4-42d5-ad09-37e9adabfff6</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>..\..</DockerfileContext>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>$(DefineConstants)TRACE;DUENDE</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DefineConstants>$(DefineConstants)TRACE;DUENDE</DefineConstants>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\Aguacongas.TheIdServer.Shared\Areas\Identity\Pages\Account\Grants.cshtml.cs" Link="Areas\Identity\Pages\Account\Grants.cshtml.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Areas\Identity\Pages\Account\LoginWith2fa.cshtml.cs" Link="Areas\Identity\Pages\Account\LoginWith2fa.cshtml.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Boot.cs" Link="Boot.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Config.cs" Link="Config.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Extensions\IdentityServerBuilderExtensions.cs" Link="Extensions\IdentityServerBuilderExtensions.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Program.cs" Link="Program.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Account\AccountController.cs" Link="Quickstart\Account\AccountController.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Account\AccountOptions.cs" Link="Quickstart\Account\AccountOptions.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Account\ExternalController.cs" Link="Quickstart\Account\ExternalController.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Account\ExternalProvider.cs" Link="Quickstart\Account\ExternalProvider.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Account\InvalidReturnUrlException.cs" Link="Quickstart\Account\InvalidReturnUrlException.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Account\LoggedOutViewModel.cs" Link="Quickstart\Account\LoggedOutViewModel.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Account\LoginInputModel.cs" Link="Quickstart\Account\LoginInputModel.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Account\LoginViewModel.cs" Link="Quickstart\Account\LoginViewModel.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Account\LogoutInputModel.cs" Link="Quickstart\Account\LogoutInputModel.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Account\LogoutViewModel.cs" Link="Quickstart\Account\LogoutViewModel.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Account\RedirectViewModel.cs" Link="Quickstart\Account\RedirectViewModel.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Consent\ConsentController.cs" Link="Quickstart\Consent\ConsentController.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Consent\ConsentInputModel.cs" Link="Quickstart\Consent\ConsentInputModel.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Consent\ConsentOptions.cs" Link="Quickstart\Consent\ConsentOptions.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Consent\ConsentViewModel.cs" Link="Quickstart\Consent\ConsentViewModel.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Consent\ProcessConsentResult.cs" Link="Quickstart\Consent\ProcessConsentResult.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Consent\ScopeViewModel.cs" Link="Quickstart\Consent\ScopeViewModel.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Device\DeviceAuthorizationInputModel.cs" Link="Quickstart\Device\DeviceAuthorizationInputModel.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Device\DeviceAuthorizationViewModel.cs" Link="Quickstart\Device\DeviceAuthorizationViewModel.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Device\DeviceController.cs" Link="Quickstart\Device\DeviceController.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Diagnostics\DiagnosticsController.cs" Link="Quickstart\Diagnostics\DiagnosticsController.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Diagnostics\DiagnosticsViewModel.cs" Link="Quickstart\Diagnostics\DiagnosticsViewModel.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Extensions.cs" Link="Quickstart\Extensions.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Home\ErrorViewModel.cs" Link="Quickstart\Home\ErrorViewModel.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\Home\HomeController.cs" Link="Quickstart\Home\HomeController.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Quickstart\SecurityHeadersAttribute.cs" Link="Quickstart\SecurityHeadersAttribute.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\SeedData.cs" Link="SeedData.cs" />
<Compile Include="..\Aguacongas.TheIdServer.Shared\Startup.cs" Link="Startup.cs" />
</ItemGroup>

<ItemGroup>
<Content Include="..\Aguacongas.TheIdServer.Shared\appsettings.Development.json" Link="appsettings.Development.json" />
<Content Include="..\Aguacongas.TheIdServer.Shared\appsettings.json" Link="appsettings.json" />
<Content Include="..\Aguacongas.TheIdServer.Shared\compilerconfig.json" Link="compilerconfig.json" />
<Content Include="..\Aguacongas.TheIdServer.Shared\libman.json" Link="libman.json" />
<Content Include="..\Aguacongas.TheIdServer.Shared\ScaffoldingReadMe.txt" Link="ScaffoldingReadMe.txt" />
</ItemGroup>

<ItemGroup>
<None Include="..\Aguacongas.TheIdServer.Shared\Areas\Identity\Pages\Account\Grants.cshtml" Link="Areas\Identity\Pages\Account\Grants.cshtml" />
<None Include="..\Aguacongas.TheIdServer.Shared\Areas\Identity\Pages\Account\LoginWith2fa.cshtml" Link="Areas\Identity\Pages\Account\LoginWith2fa.cshtml" />
<None Include="..\Aguacongas.TheIdServer.Shared\compilerconfig.json.defaults" Link="compilerconfig.json.defaults" />
<None Include="..\Aguacongas.TheIdServer.Shared\README.md" Link="README.md" />
<None Include="..\Aguacongas.TheIdServer.Shared\tempkey.rsa" Link="tempkey.rsa" />
<None Include="..\Aguacongas.TheIdServer.Shared\updateUI.ps1" Link="updateUI.ps1" />
<None Include="..\Aguacongas.TheIdServer.Shared\Views\Account\AccessDenied.cshtml" Link="Views\Account\AccessDenied.cshtml" />
<None Include="..\Aguacongas.TheIdServer.Shared\Views\Account\LoggedOut.cshtml" Link="Views\Account\LoggedOut.cshtml" />
<None Include="..\Aguacongas.TheIdServer.Shared\Views\Account\Login.cshtml" Link="Views\Account\Login.cshtml" />
<None Include="..\Aguacongas.TheIdServer.Shared\Views\Account\Logout.cshtml" Link="Views\Account\Logout.cshtml" />
<None Include="..\Aguacongas.TheIdServer.Shared\Views\Consent\Index.cshtml" Link="Views\Consent\Index.cshtml" />
<None Include="..\Aguacongas.TheIdServer.Shared\Views\Device\Success.cshtml" Link="Views\Device\Success.cshtml" />
<None Include="..\Aguacongas.TheIdServer.Shared\Views\Device\UserCodeCapture.cshtml" Link="Views\Device\UserCodeCapture.cshtml" />
<None Include="..\Aguacongas.TheIdServer.Shared\Views\Device\UserCodeConfirmation.cshtml" Link="Views\Device\UserCodeConfirmation.cshtml" />
<None Include="..\Aguacongas.TheIdServer.Shared\Views\Diagnostics\Index.cshtml" Link="Views\Diagnostics\Index.cshtml" />
<None Include="..\Aguacongas.TheIdServer.Shared\Views\Shared\Error.cshtml" Link="Views\Shared\Error.cshtml" />
<None Include="..\Aguacongas.TheIdServer.Shared\Views\Shared\Redirect.cshtml" Link="Views\Shared\Redirect.cshtml" />
<None Include="..\Aguacongas.TheIdServer.Shared\Views\Shared\_Layout.cshtml" Link="Views\Shared\_Layout.cshtml" />
<None Include="..\Aguacongas.TheIdServer.Shared\Views\Shared\_LoginPartial.cshtml" Link="Views\Shared\_LoginPartial.cshtml" />
<None Include="..\Aguacongas.TheIdServer.Shared\Views\Shared\_ScopeListItem.cshtml" Link="Views\Shared\_ScopeListItem.cshtml" />
<None Include="..\Aguacongas.TheIdServer.Shared\Views\Shared\_ValidationSummary.cshtml" Link="Views\Shared\_ValidationSummary.cshtml" />
<None Include="..\Aguacongas.TheIdServer.Shared\Views\_ViewImports.cshtml" Link="Views\_ViewImports.cshtml" />
<None Include="..\Aguacongas.TheIdServer.Shared\Views\_ViewStart.cshtml" Link="Views\_ViewStart.cshtml" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.11.1" />
</ItemGroup>

<ItemGroup>
<Folder Include="Areas\Identity\Pages\Account\" />
<Folder Include="Extensions\" />
<Folder Include="Quickstart\Account\" />
<Folder Include="Quickstart\Consent\" />
<Folder Include="Quickstart\Device\" />
<Folder Include="Quickstart\Diagnostics\" />
<Folder Include="Quickstart\Home\" />
<Folder Include="Views\Account\" />
<Folder Include="Views\Consent\" />
<Folder Include="Views\Device\" />
<Folder Include="Views\Diagnostics\" />
<Folder Include="Views\Shared\" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Aguacongas.TheIdServer\Aguacongas.TheIdServer.csproj" />
<ProjectReference Include="..\IdentityServer\Duende\Aguacongas.IdentityServer.Admin.Duende\Aguacongas.IdentityServer.Admin.Duende.csproj" />
<ProjectReference Include="..\IdentityServer\Duende\Aguacongas.IdentityServer.EntityFramework.Store.Duende\Aguacongas.IdentityServer.EntityFramework.Store.Duende.csproj" />
<ProjectReference Include="..\IdentityServer\Duende\Aguacongas.IdentityServer.MongoDb.Store.Duende\Aguacongas.IdentityServer.MongoDb.Store.Duende.csproj" />
<ProjectReference Include="..\IdentityServer\Duende\Aguacongas.IdentityServer.RavenDb.Store.Duende\Aguacongas.IdentityServer.RavenDb.Store.Duende.csproj" />
<ProjectReference Include="..\IdentityServer\Duende\Aguacongas.IdentityServer.WsFederation.Duende\Aguacongas.IdentityServer.WsFederation.Duende.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

#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.
#For more information, please see https://aka.ms/containercompat

FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
WORKDIR /app
EXPOSE 80
Expand All @@ -11,18 +8,26 @@ EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /src
COPY ["nuget.config", "."]
COPY ["src/Aguacongas.TheIdServer/Aguacongas.TheIdServer.csproj", "src/Aguacongas.TheIdServer/"]
COPY ["src/Aguacongas.TheIdServer.Identity/Aguacongas.TheIdServer.Identity.csproj", "src/Aguacongas.TheIdServer.Identity/"]
COPY ["src/IdentityServer/Aguacongas.IdentityServer.Store/Aguacongas.IdentityServer.Store.csproj", "src/IdentityServer/Aguacongas.IdentityServer.Store/"]
COPY ["src/IdentityServer/Migrations/Aguacongas.TheIdServer.Migrations.Sqlite/Aguacongas.TheIdServer.Migrations.Sqlite.csproj", "src/IdentityServer/Migrations/Aguacongas.TheIdServer.Migrations.Sqlite/"]
COPY ["src/IdentityServer/Aguacongas.IdentityServer.EntityFramework.Store/Aguacongas.IdentityServer.EntityFramework.Store.csproj", "src/IdentityServer/Aguacongas.IdentityServer.EntityFramework.Store/"]
COPY ["src/Aguacongas.TheIdServer.Duende/Aguacongas.TheIdServer.Duende.csproj", "src/Aguacongas.TheIdServer.Duende/"]
COPY ["src/IdentityServer/IS4/Aguacongas.IdentityServer.Admin.IS4/Aguacongas.IdentityServer.Admin.IS4.csproj", "src/IdentityServer/IS4/Aguacongas.IdentityServer.Admin.IS4/"]
COPY ["src/IdentityServer/Aguacongas.IdentityServer.Admin/Aguacongas.IdentityServer.Admin.csproj", "src/IdentityServer/Aguacongas.IdentityServer.Admin/"]
COPY ["src/IdentityServer/Aguacongas.IdentityServer.KeysRotation/Aguacongas.IdentityServer.KeysRotation.csproj", "src/IdentityServer/Aguacongas.IdentityServer.KeysRotation/"]
COPY ["src/IdentityServer/Aguacongas.IdentityServer/Aguacongas.IdentityServer.csproj", "src/IdentityServer/Aguacongas.IdentityServer/"]
COPY ["src/Aguacongas.TheIdServer.Authentication/Aguacongas.TheIdServer.Authentication.csproj", "src/Aguacongas.TheIdServer.Authentication/"]
COPY ["src/IdentityServer/Aguacongas.IdentityServer.Store/Aguacongas.IdentityServer.Store.csproj", "src/IdentityServer/Aguacongas.IdentityServer.Store/"]
COPY ["src/Aguacongas.TheIdServer.Identity/Aguacongas.TheIdServer.Identity.csproj", "src/Aguacongas.TheIdServer.Identity/"]
COPY ["src/IdentityServer/IS4/Aguacongas.IdentityServer.KeysRotation.IS4/Aguacongas.IdentityServer.KeysRotation.IS4.csproj", "src/IdentityServer/IS4/Aguacongas.IdentityServer.KeysRotation.IS4/"]
COPY ["src/IdentityServer/IS4/Aguacongas.IdentityServer.IS4/Aguacongas.IdentityServer.IS4.csproj", "src/IdentityServer/IS4/Aguacongas.IdentityServer.IS4/"]
COPY ["src/IdentityServer/IS4/Aguacongas.IdentityServer.MongoDb.Store.IS4/Aguacongas.IdentityServer.MongoDb.Store.IS4.csproj", "src/IdentityServer/IS4/Aguacongas.IdentityServer.MongoDb.Store.IS4/"]
COPY ["src/IdentityServer/Aguacongas.IdentityServer.MongoDb.Store/Aguacongas.IdentityServer.MongoDb.Store.csproj", "src/IdentityServer/Aguacongas.IdentityServer.MongoDb.Store/"]
COPY ["src/IdentityServer/IS4/Aguacongas.IdentityServer.RavenDb.Store.IS4/Aguacongas.IdentityServer.RavenDb.Store.IS4.csproj", "src/IdentityServer/IS4/Aguacongas.IdentityServer.RavenDb.Store.IS4/"]
COPY ["src/IdentityServer/Aguacongas.IdentityServer.RavenDb.Store/Aguacongas.IdentityServer.RavenDb.Store.csproj", "src/IdentityServer/Aguacongas.IdentityServer.RavenDb.Store/"]
COPY ["src/Aguacongas.TheIdServer/Aguacongas.TheIdServer.csproj", "src/Aguacongas.TheIdServer/"]
COPY ["src/IdentityServer/Migrations/Aguacongas.TheIdServer.Migrations.Sqlite/Aguacongas.TheIdServer.Migrations.Sqlite.csproj", "src/IdentityServer/Migrations/Aguacongas.TheIdServer.Migrations.Sqlite/"]
COPY ["src/IdentityServer/Aguacongas.IdentityServer.EntityFramework.Store/Aguacongas.IdentityServer.EntityFramework.Store.csproj", "src/IdentityServer/Aguacongas.IdentityServer.EntityFramework.Store/"]
COPY ["src/IdentityServer/Aguacongas.IdentityServer.Http.Store/Aguacongas.IdentityServer.Http.Store.csproj", "src/IdentityServer/Aguacongas.IdentityServer.Http.Store/"]
COPY ["src/IdentityServer/Aguacongas.IdentityServer.Admin.Http.Store/Aguacongas.IdentityServer.Admin.Http.Store.csproj", "src/IdentityServer/Aguacongas.IdentityServer.Admin.Http.Store/"]
COPY ["src/IdentityServer/Migrations/Aguacongas.TheIdServer.Migrations.SqlServer/Aguacongas.TheIdServer.Migrations.SqlServer.csproj", "src/IdentityServer/Migrations/Aguacongas.TheIdServer.Migrations.SqlServer/"]
COPY ["src/IdentityServer/Aguacongas.IdentityServer.MongoDb.Store/Aguacongas.IdentityServer.MongoDb.Store.csproj", "src/IdentityServer/Aguacongas.IdentityServer.MongoDb.Store/"]
COPY ["src/IdentityServer/Aguacongas.IdentityServer.WsFederation/Aguacongas.IdentityServer.WsFederation.csproj", "src/IdentityServer/Aguacongas.IdentityServer.WsFederation/"]
COPY ["src/Aguacongas.TheIdServer.BlazorApp/Aguacongas.TheIdServer.BlazorApp.csproj", "src/Aguacongas.TheIdServer.BlazorApp/"]
COPY ["src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Pages.ApiScope/Aguacongas.TheIdServer.BlazorApp.Pages.ApiScope.csproj", "src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Pages.ApiScope/"]
Expand Down Expand Up @@ -51,17 +56,17 @@ COPY ["src/BlazorApp/Aguacongas.TheIdServer.BlazorApp.Pages.Users/Aguacongas.The
COPY ["src/IdentityServer/Migrations/Aguacongas.TheIdServer.Migrations.Oracle/Aguacongas.TheIdServer.Migrations.Oracle.csproj", "src/IdentityServer/Migrations/Aguacongas.TheIdServer.Migrations.Oracle/"]
COPY ["src/IdentityServer/Migrations/Aguacongas.TheIdServer.Migrations.MySql/Aguacongas.TheIdServer.Migrations.MySql.csproj", "src/IdentityServer/Migrations/Aguacongas.TheIdServer.Migrations.MySql/"]
COPY ["src/IdentityServer/Migrations/Aguacongas.TheIdServer.Migrations.PostgreSQL/Aguacongas.TheIdServer.Migrations.PostgreSQL.csproj", "src/IdentityServer/Migrations/Aguacongas.TheIdServer.Migrations.PostgreSQL/"]
COPY ["src/IdentityServer/Aguacongas.IdentityServer.Admin/Aguacongas.IdentityServer.Admin.csproj", "src/IdentityServer/Aguacongas.IdentityServer.Admin/"]
COPY ["src/IdentityServer/Aguacongas.IdentityServer.RavenDb.Store/Aguacongas.IdentityServer.RavenDb.Store.csproj", "src/IdentityServer/Aguacongas.IdentityServer.RavenDb.Store/"]
RUN dotnet restore "src/Aguacongas.TheIdServer/Aguacongas.TheIdServer.csproj"
COPY ["src/IdentityServer/IS4/Aguacongas.IdentityServer.EntityFramework.Store.IS4/Aguacongas.IdentityServer.EntityFramework.Store.IS4.csproj", "src/IdentityServer/IS4/Aguacongas.IdentityServer.EntityFramework.Store.IS4/"]
COPY ["src/IdentityServer/IS4/Aguacongas.IdentityServer.WsFederation.IS4/Aguacongas.IdentityServer.WsFederation.IS4.csproj", "src/IdentityServer/IS4/Aguacongas.IdentityServer.WsFederation.IS4/"]
RUN dotnet restore "src/Aguacongas.TheIdServer.Duende/Aguacongas.TheIdServer.Duende.csproj"
COPY . .
WORKDIR "/src/src/Aguacongas.TheIdServer"
RUN dotnet build "Aguacongas.TheIdServer.csproj" -c Release -o /app/build
WORKDIR "/src/src/Aguacongas.TheIdServer.Duende"
RUN dotnet build "Aguacongas.TheIdServer.Duende.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "Aguacongas.TheIdServer.csproj" -c Release -o /app/publish
RUN dotnet publish "Aguacongas.TheIdServer.Duende.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Aguacongas.TheIdServer.dll"]
ENTRYPOINT ["dotnet", "Aguacongas.TheIdServer.Duende.dll"]
23 changes: 23 additions & 0 deletions src/Aguacongas.TheIdServer.Duende/Dockerfile.original
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /src
COPY ["nuget.config", "."]
COPY ["src/Aguacongas.TheIdServer.IS4/Aguacongas.TheIdServer.IS4.csproj", "src/Aguacongas.TheIdServer.IS4/"]
RUN dotnet restore "src/Aguacongas.TheIdServer.IS4/Aguacongas.TheIdServer.IS4.csproj"
COPY . .
WORKDIR "/src/src/Aguacongas.TheIdServer.IS4"
RUN dotnet build "Aguacongas.TheIdServer.IS4.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "Aguacongas.TheIdServer.IS4.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Aguacongas.TheIdServer.IS4.dll"]
Loading

0 comments on commit 4640601

Please sign in to comment.