As some documents to enable PGO:
export DOTNET_ReadyToRun=0
export DOTNET_TieredPGO=1
export DOTNET_TC_QuickJitForLoops=1
But I didn't find how to config in dockerfile, or where should I config in build or publish stage.
It should just be normal environemnt variables as per documentation: https://docs.docker.com/engine/reference/builder/#env
ENV DOTNET_ReadyToRun=0
ENV DOTNET_TieredPGO=1
ENV DOTNET_TC_QuickJitForLoops=1