Force continue with new image?

Hi all ,

Currently working on a CI/CD piece for deploying an environment.
The idea would be we’ve a repo with 15-20 microservices that are updated regularly and when they are we want to deploy them to a specific EC2 instance

for the deployment aspect I’ve been given two docker-compose yml files and essentially two commands by developers to run the stop / start

docker-compose -f ${path}/${1}/docker-compose.yml up -d
and
docker-compose -f ${path}/${1}/docker-compose.yml down

Now everything will work fine on the first run , in that it’s a fresh EC2 instance and the containers will deploy no problems.
My issues is with the when the MS is updated then we would run into issues.

Pulling xxxx (url-to-repo/xxxx:1234567)…
ERROR: The image for the service you’re trying to recreate has been removed. If you continue, volume data could be lost. Consider backing up your data before continuing

Continue with the new image? [yN]

Now I’ve tried to circumvent this using combinations of
docker-compose -f ${path}/${1}/docker-compose.yml up -d --force-recreate
docker-compose -f ${path}/${1}/docker-compose.yml up -d -V

But I’m still blocked by having to tell docker that for each MS I want to recreate it.

In an attempt to just purge everything I even tried running
docker container stop $(docker container ls -a -q) && docker system prune -a -f --volumes

but even after that I still get asked for the confirmation.
Is there anything simple I’m missing here , or what are my options for an automated deployment that cannot rely on user input
using docker-ce 18.06.1-ce

using
docker-compose create
helped me in failing without user prompt in cases image was missing on host machine,

Is my understanding correct, that your images use mutable tags and your problem is that the updated images are not recognized automaticly?

docker-compose -f ${path}/${1}/docker-compose.yml pull will pull all updated images for this compose.yml. Then a docker-compose -f ${path}/${1}/docker-compose.yml up -d should detect a changed Image Id and recreate only the services for the new images.

Though, if you use immutable tags a dedicated pull is not neccessary, as it gets as simple as changing the tags in the docker-compose.yml.