-1

I'm a java programmer .I have a java program that depends on Cassandra,elastic search,mongdb and Kafka .. So every time I try to run my java application I have to bring all these services up .. So you think it's a good idea to create one docker container with all these services and have that docker file checked in as part of that java project ?

Dhyan
  • 551
  • 2
  • 6
  • 15

1 Answers1

1

While you can bundle all the dependencies for the application into the image it doesn't quite make sense, especially if those components might be run in different places for different environments.

This is precisely what the Compose project (originally fig) set out to solve. Along with the Dockerfile for the application, you would have a docker-compose.yml file that describes the services and how they link to each other. It also has options to set the build location of your application so that you can build and bring up the application with just the docker-compose utility.

Andy Shinn
  • 26,561
  • 8
  • 75
  • 93