Rolando Azevedo
Rolando Azevedo

Reputation: 305

Build 3 services with docker-compose but start only 2 containers

I am starting with docker-compose so i do have a noob question. I want to build three services, but having two running permantly and one that will run via contrab. Is it possible to build the image of the three and just run two with docker-compose (build/up)? Or should i have the a docker-compose to build and run the two permanent ones, and manualy build the third one?

Upvotes: 0

Views: 288

Answers (1)

OneCricketeer
OneCricketeer

Reputation: 191701

You could make a script that wraps both of these commands

docker-compose build
docker-compose up service1 service2

Upvotes: 1

Related Questions