3 ms·
The "one docker container per VM" is a Beanstalk-imposed constraint, not a Docker constraint. I think it's helpful to frame Docker in terms of encapsulation.
by mikebabineau 12y ago
The "one docker container per VM" is a Beanstalk-imposed constraint, not a Docker constraint.
I think it's helpful to frame Docker in terms of encapsulation.
Imagine a basic Java app with multiple dependencies. Rather than build a lean app.jar and rely on the host providing dependency1.jar and dependency2.jar, many folks package it all into a single app_with_dependencies.jar.
But what if your app is a web app with static content? Rather than depending on the host system to serve the static content separately, many folks package it all into a single app_with_content.war.
But what if your app needs a specific version of Java? Rather than depending on the host system to have the exact Java you need, folks are starting to package the app into a Docker image that has their desired Java version.
Each layer of encapsulation simplifies server provisioning and thereby improves app portability. Taken to an extreme, you can treat your hosts as homogenous and run any Docker container from any server.