Say I have an n-tier application that requires a DB Image, App Server Image, a load balancer image. Assume all of them are Ubuntu images. The recommendation seems to be use 3 different images and run 3 different containers. In that case what about these two..
1.Since each Image has Ubuntu libraries etc. are all of them going to install the same ubuntu stuff 3 times on my disk, requiring me to allocate that much disk space?
2.Similarly at run time, do those containers make use of the Ubuntu stuff in some efficient way or all of them load everything into the memory independently (again 3 times the duplication)
If all three Docker images use the same Ubuntu base image no duplication happens. I suggest you read upon the core Docker architecture to appreciate this. If possible, consider using a lightweight base image such as Alpine or BusyBox rather than a full-blown, fat one such as Ubuntu.
The most important aspect (esp. if you come from a strong VM background) is to think of Docker images as application-level dependency management tools. Yes, they provide isolation. Yes, you can throttle resource consumption. But first and foremost, they are (rather short-lived) application bundle and execution environments.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With