From what I identified in #3789 for 8.4 branching and switch to 8.5 on the main branch, Dockerfiles are the number one place which requires updates every time major or minor version changes.
To reduce the reoccurring maintenance, it would be good if the the version of GRASS GIS is not repeated in the file several times or preferably if it is not there at all.