Skip to content

Commit 7156919

Browse files
committed
Ensure tar installed in SDK for Mariner 2.0 (#4065)
(cherry picked from commit 676db0d)
1 parent 0fd5e85 commit 7156919

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

eng/dockerfile-templates/sdk/Dockerfile.linux

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
[
2525
"git",
2626
when(dotnetVersion = "3.1", "procps-ng", ""),
27-
when(find(OS_VERSION, "1.0") < 0 && dotnetVersion = "6.0", "tar", "")
27+
when(find(OS_VERSION, "1.0") < 0, "tar", "")
2828
],
2929
[
3030
"curl",

src/sdk/7.0/cbl-mariner2.0/amd64/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ ENV \
1919

2020
RUN tdnf install -y \
2121
git \
22+
tar \
2223
&& tdnf clean all
2324

2425
# Install .NET SDK

src/sdk/7.0/cbl-mariner2.0/arm64v8/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ ENV \
1919

2020
RUN tdnf install -y \
2121
git \
22+
tar \
2223
&& tdnf clean all
2324

2425
# Install .NET SDK

tests/Microsoft.DotNet.Docker.Tests/SdkImageTests.cs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -253,15 +253,12 @@ public void VerifyGitInstallation(ProductImageData imageData)
253253
[MemberData(nameof(GetImageData))]
254254
public void VerifyTarInstallation(ProductImageData imageData)
255255
{
256-
if (imageData.Version.Major != 7)
257-
{
258-
// tar should exist in the SDK for both Linux and Windows. The --version option works in either OS
259-
DockerHelper.Run(
260-
image: imageData.GetImage(DotNetImageType.SDK, DockerHelper),
261-
name: imageData.GetIdentifier("tar"),
262-
command: "tar --version"
263-
);
264-
}
256+
// tar should exist in the SDK for both Linux and Windows. The --version option works in either OS
257+
DockerHelper.Run(
258+
image: imageData.GetImage(DotNetImageType.SDK, DockerHelper),
259+
name: imageData.GetIdentifier("tar"),
260+
command: "tar --version"
261+
);
265262
}
266263

267264
private IEnumerable<SdkContentFileInfo> GetActualSdkContents(ProductImageData imageData)

0 commit comments

Comments
 (0)