Reputation: 53
We have multiple spring boot applications where one provide input to other.
As of now we are deploying it in 3 different VM and connect each other.
Is it advisable to make all these 3 into a single docker image?
Say, if I am able to make it into single docker image, it is easy for me to provide this images for different team.
As per the memory need, it is OK to be part of single image, I did that analysis.
Upvotes: 2
Views: 1860
Reputation: 1324208
If they are tightly coupled and can be managed under one process, yes.
You need to make sure you can stop the all system properly (to avoid zombie processes: see "Use of Supervisor in docker")
But the idea behind containers remains to isolate each components of your system in its own container, which facilitate debugging (when one part misbehave), upgrade, logging and monitoring.
You can experiment with multi-container apps by using docker bundles (dab) in order to facilitate the distribution of your multi-container application.
To help you with DAB, see:
Upvotes: 4
Reputation: 583
Distributed Application Bundle, or DAB, is a new concept introduced in Docker 1.12, is a portable format for multiple containers. Each bundle can be then deployed as a Stack at runtime. Let's use a Docker Compose file, create a DAB from it, and deploy it as a Docker Stack. https://blog.couchbase.com/2016/july/docker-services-stack-distributed-application-bundle
Upvotes: 1