How to version .NET Core assemblies with a CI Docker pipeline?

I have a Azure Devops Docker Compose CI pipeline that works well, but I would like to update my assemblies at build time (something similar to the "Version .NET Core Assemblies" task, but for containers) .

An idea how?