From bf6121b3f13ce11af6b4d2c0bea6aea3168ff2c9 Mon Sep 17 00:00:00 2001 From: Alexander Sher Date: Thu, 3 Sep 2020 18:45:11 -0500 Subject: [PATCH 1/2] Add support for both .Net Core 2.1 and .Net Core 3.1 --- .../Dockerfile | 8 +++++--- eng/containers/ci.yml | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) rename eng/containers/{UbuntuNetCore2Keyring => UbuntuNetCoreKeyring}/Dockerfile (76%) diff --git a/eng/containers/UbuntuNetCore2Keyring/Dockerfile b/eng/containers/UbuntuNetCoreKeyring/Dockerfile similarity index 76% rename from eng/containers/UbuntuNetCore2Keyring/Dockerfile rename to eng/containers/UbuntuNetCoreKeyring/Dockerfile index 1aea4649d5f73..97b5637e8b120 100644 --- a/eng/containers/UbuntuNetCore2Keyring/Dockerfile +++ b/eng/containers/UbuntuNetCoreKeyring/Dockerfile @@ -2,7 +2,7 @@ FROM mcr.microsoft.com/dotnet/core/sdk:3.1-bionic AS build ENV \ NO_AT_BRIDGE=1 \ - DOCKER_CONTAINER_NAME="ubuntu_netcore2_keyring" \ + DOCKER_CONTAINER_NAME="ubuntu_netcore_keyring" \ PSModuleAnalysisCachePath=/var/cache/microsoft/powershell/PSModuleAnalysisCache/ModuleAnalysisCache \ POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-DotnetCoreSDK-Ubuntu-18.04 @@ -13,9 +13,11 @@ RUN apt-get update \ dbus-x11 \ gnome-keyring -# Install PowerShell +# Install PowerShell && .Net SDK 2.1 RUN wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb \ && dpkg -i packages-microsoft-prod.deb \ && apt-get update \ && apt-get install -y powershell \ - && pwsh --version + && pwsh --version \ + && apt-get install -y dotnet-sdk-2.1 \ + && dotnet --list-sdks \ No newline at end of file diff --git a/eng/containers/ci.yml b/eng/containers/ci.yml index c051bc1dfc755..2e8216931d113 100644 --- a/eng/containers/ci.yml +++ b/eng/containers/ci.yml @@ -12,9 +12,9 @@ pool: vmImage: 'ubuntu-18.04' variables: - dockerfile: ./eng/containers/UbuntuNetCore2Keyring/Dockerfile + dockerfile: ./eng/containers/UbuntuNetCoreKeyring/Dockerfile containerRegistry: 'azsdkengsys' - imageRepository: 'dotnet/ubuntu_netcore2_keyring' + imageRepository: 'dotnet/ubuntu_netcore_keyring' imageTag: $(build.buildid) steps: From 80fb8e68eaf8b1d373992222c10acd634a9b77d5 Mon Sep 17 00:00:00 2001 From: Alexander Sher Date: Thu, 3 Sep 2020 19:18:30 -0500 Subject: [PATCH 2/2] Install runtime instead of SDK --- eng/containers/UbuntuNetCoreKeyring/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/containers/UbuntuNetCoreKeyring/Dockerfile b/eng/containers/UbuntuNetCoreKeyring/Dockerfile index 97b5637e8b120..9f09f0bcb2b75 100644 --- a/eng/containers/UbuntuNetCoreKeyring/Dockerfile +++ b/eng/containers/UbuntuNetCoreKeyring/Dockerfile @@ -13,11 +13,11 @@ RUN apt-get update \ dbus-x11 \ gnome-keyring -# Install PowerShell && .Net SDK 2.1 +# Install PowerShell && .net core runtime 2.1 RUN wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb \ && dpkg -i packages-microsoft-prod.deb \ && apt-get update \ && apt-get install -y powershell \ && pwsh --version \ - && apt-get install -y dotnet-sdk-2.1 \ - && dotnet --list-sdks \ No newline at end of file + && apt-get install -y dotnet-runtime-2.1 \ + && dotnet --list-runtimes \ No newline at end of file