Reduced docker-compose (it’s quite a bit more involved):
Basic notion - I want services “tomcat” and “postgres” to run on docker-compose up. I would rather that “maven” ONLY run on “docker-compose run maven”, but not necessarily run (and take 8-10 minutes of compile time) on “docker-compose up”. I want them inter-related (named volume that is shared) but different containers.
Which would you choose (or, more to the point, am I missing a better option)?
1.) always do “docker-compose run -d postgres tomcat” instead of "docker-compose up"
2.) Modify “maven” to have a no-op RUN statement, then the real run becomes “docker-compose run maven maven-run.sh”
option 3 would be suggesting an “autorun: false” option for the next docker-compose schema