currently we are working on an avalonia project with the avalonia template.
we consider upating to net 7 (or soon 8) since the performance improvements are great. but i dont get how i would update the container of the template correctly. there is the references dotnet-debug container that ships a net6 runtime. how would i be able to update that to 7 or 8 later?
Currently our dotnet containers just install what the marked LTS release is for dotnet. Which at the time of writing is dotnet 6. If you want to use some alternative version you’d have to modify your template to use this.
You’d need to change this container image that we use for the dotnet build-time:
# BUILD ------------------------------------------------------------------------
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS Build
This container comes from Microsoft they probably have one for 7.0, but you may need to check.
Then for actual runtime as you stated you’d need to change this container image:
# DOTNET -----------------------------------------------------------------------
FROM --platform=linux/${IMAGE_ARCH} \
torizon/dotnet:${DOTNET_BASE_VERSION} AS Dotnet
That said you could try to create your own container image that has another dotnet version installed. Then substitute your custom dotnet container into the template Dockerfile.
Of course I can’t guarantee any of this will work with the alternate dotnet versions. But it’s something you can give a try.
hi, thanks for your answer.
so that means very soonish there will be dotnet 8 container from your side, since it is the next LTS an released in a few weeks?
so that means very soonish there will be dotnet 8 container from your side, since it is the next LTS an released in a few weeks?
Well in theory, though I imagine it won’t be an instantaneous transition. Also we haven’t had any discussions yet regarding .NET 8 so there may still need to be some internal discussions on our side. Anyways .NET 6 is still supported for another year to allow transition so it’s not like we drop it immediately.
We literally just use the standard install method with the dotnet-install.sh script. We just specify the “latest” version, which by the script’s definition defaults to the latest LTS. I’m not sure once .NET 8 is released whether this script will then point to .NET 8 right away or not.