Docker fails to pull specified .NET SDK within Jenkins (SDK not found error)

604 views Asked by At

My solution is hosted on AWS and apparently they are cutting off support to .NET core 1.0 by July 1.

Therefore I am looking to upgrade my version of .NET core from 1.0 to 2.1. I am able to deploy directly to AWS (using "sls deploy ...") without issue, however I am experiencing problems doing so through Jenkins.

The getCompileDockerImage() function within my Jenkinsfile returns a version of the SDK which is compatible with 2.1 (2.1.507-sdk).

It contains the following code:

def getCompileDockerImage()
{
    return 'microsoft/dotnet:2.1.507-sdk'
}

However, upon docker running the "docker pull microsoft/dotnet:2.1.507-sdk" command, I get the following message: "Error response from daemon: manifest for microsoft/dotnet:2.1.507-sdk not found".

I assume that the SDK specified is not available for Jenkins to use, but I'm not sure how to go about downloading that version.

I've tried to SSH into both the Master and Slave instance to try and determine what is installed on those instances, but running "dotnet --info" yields no results.

Expected results: Jenkins is able to pull the specified SDK and build the solution Actual results: Jenkins fails to pull the specified SDK

1

There are 1 answers

0
Chris Pratt On BEST ANSWER

Microsoft made some changes to how their Docker images work. Officially, they're all now on Microsoft's own Azure Container Registry (mcr.microsoft.com). The Docker Hub listings all now go there. To your actual question, the .NET Core SDK image is now at mcr.microsoft.com/dotnet/core/sdk, and you set a tag for the major/minor version, i.e. mcr.microsoft.com/dotnet/core/sdk:2.1. Or, specifically, mcr.microsoft.com/dotnet/core/sdk:2.1.507. However, not all revisions may be available, so if that doesn't work, just use 2.1. The revision number shouldn't really matter anyways (i.e. you should probably just always use the latest revision, anyways).