I'm using docker to build and deploy applications. After building the image i need to tag and use that image from another system which has docker-compose on it. I'm using Jenkins to build and deploy images to private docker registries. Docker compose file on the host system should automatically pull those images based on tag version.
How to pass variables to docker-compose to substitute tag values ?
Example: if a=2.4 then it should substitute 2.4 inside docker-compose file for a.
version: '2'
services:
web:
image: httpd:$a
ports:
- 80:80