Reputation: 1396
I wonder if we have an option to configure docker-compose
to ignore errors of one of the containers and continue to start others.
For example, here is my docker-compose.yml
version: '3'
services:
web:
build: .
redis:
image: redis
If redis container fails to start, the web container still start.
Upvotes: 10
Views: 5502
Reputation: 4026
The only way I know of to do what you are asking is a bit ugly:
Bring your services up one at a time, ignoring any errors:
docker-compose up -d web || true
docker-compose up -d redis || true
Upvotes: 11