I have docker-compose file that runs 4 services:
- web
- db
- redis
- selenium
I would like the containers of services redis and selenium to always start fresh when I execute docker-compose, while preserving the state of web and db.
I don't mind if this is achieved destroyng the containers on exit or recreating new ones on start. At the moment I run this command:
docker-compose rm selenium && docker-compose rm redis && docker-compose up
I would prefer to have the same behavior using the docker-compose.yml file, instead of the command line.