Reputation: 366
My docker compose looks like :
version: '2.1'
services:
rabbitmq:
image: "rabbitmq"
ports:
- "5672:5672"
- "15672:15672"
- "61613:61613"
a:
build: ./a
hostname: "a"
ports:
- "49297:49297"
links:
- "rabbitmq"
b:
build: ./b
hostname: "b"
ports:
- "49597:49297"
links:
- "rabbitmq"
I want to see logs from services a and b; and not for rabbitmq. When I do, "docker-compose up --build" logging from all the three service starts.
I want to use "-d"(detached) with rabbitmq; but unable to find the right syntax. Any ideas?
Upvotes: 1
Views: 339
Reputation: 4122
Would this work for your case:
docker-compose up -d rabbitmq && docker-compose up a b
Upvotes: 1