Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[release/8.0.4xx] Fix regression - single arch scenario with no rid specified #45746

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@

<ItemGroup Label="AppCommand Assignment" Condition="'$(ContainerAppCommandInstruction)' != 'None'">
<!-- For self-contained, invoke the native executable as a single arg -->
<ContainerAppCommand Condition="@(ContainerAppCommand->Count()) == 0 and '$(UseAppHost)' == 'true' and !$(_ContainerIsTargetingWindows)" Include="$(ContainerWorkingDirectory)/$(AssemblyName)" />
<ContainerAppCommand Condition="@(ContainerAppCommand->Count()) == 0 and '$(UseAppHost)' == 'true' and $(_ContainerIsTargetingWindows)" Include="$(AssemblyName)$(_NativeExecutableExtension)" />
<ContainerAppCommand Condition="@(ContainerAppCommand->Count()) == 0 and '$(_ContainerIsSelfContained)' == 'true' and !$(_ContainerIsTargetingWindows)" Include="$(ContainerWorkingDirectory)/$(AssemblyName)" />
<ContainerAppCommand Condition="@(ContainerAppCommand->Count()) == 0 and '$(_ContainerIsSelfContained)' == 'true' and $(_ContainerIsTargetingWindows)" Include="$(AssemblyName)$(_NativeExecutableExtension)" />
<!-- For non self-contained, invoke `dotnet` `app.dll` as separate args -->
<ContainerAppCommand Condition="@(ContainerAppCommand->Count()) == 0" Include="dotnet;$(TargetFileName)" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,39 @@ public void EndToEnd_NoAPI_Console()
privateNuGetAssets.Delete(true);
}

[DockerAvailableFact]
public void EndToEnd_SingleArch_NoRid()
{
// Create a new console project
DirectoryInfo newProjectDir = CreateNewProject("console");

string imageName = NewImageName();
string imageTag = "1.0";

// Run PublishContainer for multi-arch
CommandResult commandResult = new DotnetCommand(
_testOutput,
"publish",
"/t:PublishContainer",
$"/p:ContainerBaseImage={DockerRegistryManager.FullyQualifiedBaseImageAspNet}",
$"/p:ContainerRepository={imageName}",
$"/p:ContainerImageTag={imageTag}",
"/p:EnableSdkContainerSupport=true")
.WithWorkingDirectory(newProjectDir.FullName)
.Execute();
commandResult.Should().Pass();

// Check that the containers can be run
CommandResult processResultX64 = ContainerCli.RunCommand(
_testOutput,
"--rm",
"--name",
$"test-container-singlearch-norid",
$"{imageName}:{imageTag}")
.Execute();
processResultX64.Should().Pass().And.HaveStdOut("Hello, World!");
}

[DockerSupportsArchFact("linux/arm64")]
public void EndToEndMultiArch_LocalRegistry()
{
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.