Is there an automatic roll forward for minor/patch versions of .NET 5 in Dockerfile

  .net-5, docker, dockerfile

When starting a .NET 5 project locally there is an automatic roll forward, meaning when starting the project the runtime will choose the newest minor/patch version installed on the system.

For deploy to production I use docker with a typical Dockerfile with lines like




When typing "dotnet –info" on the server where the docker image is running on I always get version "5.0.0".

I would like to know if I have to enter the correct minor/patch versions manually in the Dockerfile each time a new version is released or if there is a version specifier to install those small versions with automatic roll forward.

Source: Docker Questions