How to dynamically set TAG for docker image using compose?

I’ve already seen posts similar to How to tag docker image with docker-compose

What I was hoping (which I cannot find after much research) is there is a way to get the VERSION file pulled by Dockerfile to set the TAG for the docker image being built with my docker-compose.yml

I know docker-compose will pick up on environment variables, but that seems silly when I already have a VERSION file being used by Dockerfile

Source: StackOverflow