Docker-compose up -d throwing error

I am setting up a POC for mimir and while running docker-compose up -d thowing error:

ERROR: The Compose file ‘./docker-compose.yml’ is invalid because:
Unsupported config option for services.grafana: ‘pull_policy’
docker-compose version 1.23.2, build 1110ad01
docker-py version: 3.6.0
CPython version: 3.6.7

This is working on my local with the same yaml file but when i am trying on one of my ec2 instance, getting this error.

I guess you have old docker/docker-compose version, which doesn’t understand pull_policy config

I had to do some steps for this to be fixed… one is certainly upgrading the docker-compose version. then setting up the firewalcmd and faced permission denied. Had to do chmod 666 /var/run/docker.sock and had to remove /var/run/ as well to remove some other blocker while running docker-compose up -d… finally it’s up and running…
Thanks @jangaraj