I have a docker-compose file that will startup 6 different microservices. The way our docker-repository is setup prevents the use of the 'latest' tag so I am looking for a way to run a script before docker-compose pulls the microservice images, which will set environment variables in the scope of the docker-compose.yml file.
version: '3'
services:
#Service 1
svc1:
image: some-snapshot.docker.privaterepo.com/some-service:${LATEST_SVC_TAG}
container_name: service1
ports:
- "8080:8080"
#Service 2
svc2:
image: some-snapshot.docker.privaterepo.com/some-service2:${LATEST_SVC2_TAG}
container_name: service2
ports:
- "8081:8081"