Aws-codebuild-docker-images: .Net Core version 3.0 Released

Created on 24 Sep 2019  路  12Comments  路  Source: aws/aws-codebuild-docker-images

.Net Core version 3.0 was released today (Sept 23, 2019), and the 3.1 LTS version is slated for November of this year.
I want to make sure this is on your radar to get updated in the future.

Official announcement: https://devblogs.microsoft.com/dotnet/announcing-net-core-3-0/
.Net Core release lifecycle: https://dotnet.microsoft.com/platform/support/policy/dotnet-core

version update

Most helpful comment

@willemk - We typically provide the LTS version of the images, wherever possible. We'll support .NET Core 3.x (likely just the 3.1 version) in an upcoming release.

All 12 comments

@willemk - We typically provide the LTS version of the images, wherever possible. We'll support .NET Core 3.x (likely just the 3.1 version) in an upcoming release.

I've submitted the above pull request, the current AWS Config doesn't support multiple .Net versions via the globe.json file (what .Net Core uses) - I've added this also, making it possible to support any number of .Net Core versions.

Since .Net Core supports side by side installs of any number of versions, in theory, there's no chance of conflicts if the Docker image has several .Net Core SDKs installed - As long as the global.json is properly written to choose a version.

FYI: If anyone wants to use a custom ECR image with 3.0, just in your BuildSpec.yml you'll need (in your runtime-versions): dotnet: 3.0

Then CodeBuild will need to use either your ECR built from my repo/pull request (only two files changed), or you can point to my public ECR 353336231720.dkr.ecr.us-east-1.amazonaws.com/bitshopcodebuild:latest

Any updates for the official version?

According to MS's roadmap, the 3.1 LTS version will be released in December of this year. Based on @subinataws 's message above, codebuild will be updated shortly after that release is out.

https://github.com/dotnet/core/blob/master/roadmap.md

Be aware that aws/codebuild/standard:2.0-1.13.0 broke dotnet 2. It moves dotnet 2 to a non-standard location /usr/share/dotnet2 (I guess to make way for 3.0?), but fails to set DOTNET_ROOT. So applications just crash because they can't find the framework-specific libraries.

Because we use dotnet tooling, this broke every single build and made for a bad morning 馃槩

Fixing your build image version to 'aws/codebuild/standard:2.0-1.12.0' can work around this.
Or you can can add to your build spec:

export DOTNET_ROOT="$(dirname "$(readlink "$(command -v dotnet)")")"

There is supposed to be a fix coming. How this fubar passed e2e regression testing I do not know 馃槚

My pull request handled multiple .Net versions as Microsoft recommends, hopefully AWS doesn't decide they need to do it a non recommended way by renaming folders. It was tested with multiple versions also successfully.. sigh.. @whereisaaron

They rename ~/.dotnet to ~/.dotnet2 and relink /usr/bin/dotnet to /usr/share/dotnet2/

It looks like someone is just ad libbing. Certainly they didn鈥檛 test it, since no dotnet application worked the way it was screwed up. 馃槶

Dotnet 3.0 is supported on new codebuild images(AL2 2.0 & Standard 3.0).
Ref : https://github.com/aws/aws-codebuild-docker-images/releases/tag/19.11.26

@naga-aws does this mean that Standard 2.0 has been reverted to just support .net 2.x again?

@whereisaaron - https://github.com/aws/aws-codebuild-docker-images/blob/master/ubuntu/standard/2.0/Dockerfile. The .NET core version there remains 2.x. If you were looking for .NET core 3.0, please use aws/coddebuild/standard:3.0.

Great @subinataws, much cleaner. 馃憤

Was this page helpful?
0 / 5 - 0 ratings