Q:

Docker-compose --force-recreate specific service

I have a container in my stack that needs to be recreated each time I docker-compose up. I can docker-compose up --force-recreate but this recreates all my containers. Is there syntax (maybe for the docker-compose.yml file) for specifying this kind of flag per-service?

A:

If your service depends on (or links to) other services, you can try:
docker-compose up --force-recreate --no-deps service-name

This will only recreate the specified service, linked or depended services will keep untouched.

