Wenn ich Folgendes ausführe:
Code: Select all
aspire publish
Ich habe es mit --debug ausgeführt und tatsächlich ist die einzige Ausgabe bezüglich des Docker-Images
Code: Select all
[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:
Code: Select all
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();
Code: Select all
- Ausführen von dotnetPublish auf dem AppHost: Erfolgreich, erzeugt aber keine Veröffentlichungsausgabe.
- Ausführen von AspirePublish: wird erfolgreich ausgeführt, erstellt aber kein tatsächliches Docker-Image.
Mobile version