Когда я запускаю:
Код: Выделить всё
aspire publish
Я запускал его с --debug, и действительно единственным выходом, касающимся образа Docker, является
Код: Выделить всё
[DEBUG] Docker is healthy.
[13:37:16] [dbug] DotNetCliRunner: dotnet(6976) stdout: Building container image for resource env-dashboard
[13:37:16] [dbug] DotNetCliRunner: dotnet(6976) stdout: info: Aspire.Hosting.Publishing.ResourceContainerImageBuilder[0]
[13:37:16] [dbug] DotNetCliRunner: dotnet(6976) stdout: Building container image for resource postgres
[DEBUG] Task 031e1486-9fe3-4346-8f9c-f2b3194de179 (012efe2c-0f9a-4373-9899-d032f6808562): Building image: asr-invest
[13:37:16] [dbug] DotNetCliRunner: dotnet(6976) stdout: info: Aspire.Hosting.Publishing.ResourceContainerImageBuilder[0]
[13:37:16] [dbug] DotNetCliRunner: dotnet(6976) stdout: Building container image for resource asr-invest
[13:37:16] [dbug] DotNetCliRunner: dotnet(6976) stdout: info: Aspire.Hosting.Publishing.ResourceContainerImageBuilder[0]
[13:37:16] [dbug] DotNetCliRunner: dotnet(6976) stdout: Starting .NET CLI with arguments: publish "C:\Users\st.ha\source\repos\asr-invest\ASR-Invest\ASR-Invest.csproj" --configuration Release /t:PublishContainer
/p:ContainerRepository="asr-invest"
[13:37:17] [dbug] DotNetCliRunner: dotnet(6976) stdout: info: Aspire.Hosting.Publishing.ResourceContainerImageBuilder[0]
[13:37:17] [dbug] DotNetCliRunner: dotnet(6976) stdout: dotnet publish C:\Users\st.ha\source\repos\asr-invest\ASR-Invest\ASR-Invest.csproj (stdout): Determining projects to restore...
[13:37:17] [dbug] DotNetCliRunner: dotnet(6976) stdout: info: Aspire.Hosting.Publishing.ResourceContainerImageBuilder[0]
[13:37:17] [dbug] DotNetCliRunner: dotnet(6976) stdout: dotnet publish C:\Users\st.ha\source\repos\asr-invest\ASR-Invest\ASR-Invest.csproj (stdout):
C:\Users\st.ha\source\repos\asr-invest\ASR-Invest\ASR-Invest.csproj : warning NU1510: PackageReference Microsoft.AspNetCore.SignalR.Common will not be pruned. Consider removing this package from your dependencies, as it
is likely unnecessary.
[13:37:17] [dbug] DotNetCliRunner: dotnet(6976) stdout: info: Aspire.Hosting.Publishing.ResourceContainerImageBuilder[0]
[13:37:17] [dbug] DotNetCliRunner: dotnet(6976) stdout: dotnet publish C:\Users\st.ha\source\repos\asr-invest\ASR-Invest\ASR-Invest.csproj (stdout):
C:\Users\st.ha\source\repos\asr-invest\ASR-Invest\ASR-Invest.csproj : warning NU1510: PackageReference Microsoft.AspNetCore.SignalR.Core will not be pruned. Consider removing this package from your dependencies, as it
is likely unnecessary.
[13:37:17] [dbug] DotNetCliRunner: dotnet(6976) stdout: info: Aspire.Hosting.Publishing.ResourceContainerImageBuilder[0]
[13:37:17] [dbug] DotNetCliRunner: dotnet(6976) stdout: dotnet publish C:\Users\st.ha\source\repos\asr-invest\ASR-Invest\ASR-Invest.csproj (stdout):
C:\Users\st.ha\source\repos\asr-invest\ASR-Invest\ASR-Invest.csproj : warning NU1510: PackageReference Microsoft.AspNetCore.SignalR.Protocols.Json will not be pruned. Consider removing this package from your
dependencies, as it is likely unnecessary.
[13:37:17] [dbug] DotNetCliRunner: dotnet(6976) stdout: info: Aspire.Hosting.Publishing.ResourceContainerImageBuilder[0]
[13:37:17] [dbug] DotNetCliRunner: dotnet(6976) stdout: dotnet publish C:\Users\st.ha\source\repos\asr-invest\ASR-Invest\ASR-Invest.csproj (stdout):
C:\Users\st.ha\source\repos\asr-invest\ASR-Invest\ASR-Invest.csproj : warning NU1903: Package 'Microsoft.Build.Tasks.Core' 17.14.8 has a known high severity vulnerability,
https://github.com/advisories/GHSA-w3q9-fxm7-j8fq
[13:37:17] [dbug] DotNetCliRunner: dotnet(6976) stdout: info: Aspire.Hosting.Publishing.ResourceContainerImageBuilder[0]
[13:37:17] [dbug] DotNetCliRunner: dotnet(6976) stdout: dotnet publish C:\Users\st.ha\source\repos\asr-invest\ASR-Invest\ASR-Invest.csproj (stdout):
C:\Users\st.ha\source\repos\asr-invest\ASR-Invest\ASR-Invest.csproj : warning NU1903: Package 'Microsoft.Build.Utilities.Core' 17.14.8 has a known high severity vulnerability,
https://github.com/advisories/GHSA-w3q9-fxm7-j8fq
[13:37:17] [dbug] DotNetCliRunner: dotnet(6976) stdout: info: Aspire.Hosting.Publishing.ResourceContainerImageBuilder[0]
[13:37:17] [dbug] DotNetCliRunner: dotnet(6976) stdout: dotnet publish C:\Users\st.ha\source\repos\asr-invest\ASR-Invest\ASR-Invest.csproj (stdout): All projects are up-to-date for restore.
[DEBUG] Task 031e1486-9fe3-4346-8f9c-f2b3194de179 (012efe2c-0f9a-4373-9899-d032f6808562): COMPLETED - Building image: asr-invest
[DEBUG] Building image for asr-invest completed
[DEBUG] Step 012efe2c-0f9a-4373-9899-d032f6808562: COMPLETED - Building container images completed
AppHost:
Код: Выделить всё
var builder = DistributedApplication.CreateBuilder(args);
var env = builder.AddDockerComposeEnvironment("env");
var postgres = builder.AddPostgres("postgres")
.WithLifetime(ContainerLifetime.Persistent)
.WithDataVolume();
var postgresdb = postgres.AddDatabase("db");
var myservice = builder.AddProject("asr-invest")
.WithReference(postgresdb)
.WaitFor(postgresdb)
.PublishAsDockerComposeService((resource, service) =>
{
service.Name = "asr-invest";
service.Ports.Add("8080:8080");
service.Restart = "always";
});
builder.Build().Run();
Код: Выделить всё
- Запуск публикации в dotnet на AppHost: успешно, но нет результатов публикации.
- Запуск aspirePublish: проходит успешно, но не создает реальный образ Docker.
Подробнее здесь: https://stackoverflow.com/questions/798 ... dockerfile
Мобильная версия