From the docker e-book Docker for the Virtualization Admin where they make a nice comparison of Docker to VM. VMs are houses and Docker Containers are Apartments. So here is what they say about Apartments:
The apartment building (the server running the Docker daemon,
otherwise known as a Docker host) offers shared plumbing,
heating, electrical, etc. to each apartment.
Scenario #1 Ubuntu is the Docker Host:
Image: Apache/PHP/MySQL/Store App/port 8080:80
If I start the APM image as 3 separate instances, I am sharing the same Ubuntu File System and Networking, which is really the Ubuntu Docker host, but also means my ABC store app is running concurrently.
#1) Does all modifiable data need to reside on the host? E.g. config files that may change, temp text files, etc? So for php sessions, where does that live?
#1) Is this similar to running the app concurrently so thereby your code needs to account for data and port sharing?
Scenario #2 CentOS is the Docker Host:
Image: Ubuntu/Apache/PHP/MySQL (LAMP)
#2) Same question above about the data/php sessions and configs. Do they live in CentOS or in this case Ubuntu?
#3) How does Docker know, to use CentOS or Ubuntu file system?