Skip to content

Commit

Permalink
Ensure tar installed in SDK for Mariner 2.0 (dotnet#4065)
Browse files Browse the repository at this point in the history
(cherry picked from commit 676db0d)
  • Loading branch information
mthalman committed Sep 13, 2022
1 parent 0fd5e85 commit 7156919
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion eng/dockerfile-templates/sdk/Dockerfile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
[
"git",
when(dotnetVersion = "3.1", "procps-ng", ""),
when(find(OS_VERSION, "1.0") < 0 && dotnetVersion = "6.0", "tar", "")
when(find(OS_VERSION, "1.0") < 0, "tar", "")
],
[
"curl",
Expand Down
1 change: 1 addition & 0 deletions src/sdk/7.0/cbl-mariner2.0/amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ENV \

RUN tdnf install -y \
git \
tar \
&& tdnf clean all

# Install .NET SDK
Expand Down
1 change: 1 addition & 0 deletions src/sdk/7.0/cbl-mariner2.0/arm64v8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ENV \

RUN tdnf install -y \
git \
tar \
&& tdnf clean all

# Install .NET SDK
Expand Down
15 changes: 6 additions & 9 deletions tests/Microsoft.DotNet.Docker.Tests/SdkImageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -253,15 +253,12 @@ public void VerifyGitInstallation(ProductImageData imageData)
[MemberData(nameof(GetImageData))]
public void VerifyTarInstallation(ProductImageData imageData)
{
if (imageData.Version.Major != 7)
{
// tar should exist in the SDK for both Linux and Windows. The --version option works in either OS
DockerHelper.Run(
image: imageData.GetImage(DotNetImageType.SDK, DockerHelper),
name: imageData.GetIdentifier("tar"),
command: "tar --version"
);
}
// tar should exist in the SDK for both Linux and Windows. The --version option works in either OS
DockerHelper.Run(
image: imageData.GetImage(DotNetImageType.SDK, DockerHelper),
name: imageData.GetIdentifier("tar"),
command: "tar --version"
);
}

private IEnumerable<SdkContentFileInfo> GetActualSdkContents(ProductImageData imageData)
Expand Down

0 comments on commit 7156919

Please sign in to comment.