I am in the process of trying to understand how to use Docker and have now got Docker installed on an Ubuntu 14.04 box. What I want to be able to do is to easily switch between a combination of stacks. Typical stacks
- Ubuntu + MariaDB + Apache + PHP
- CentOS + ditto
- Ubuntu + MongoDB + Nginx + PHP
From my reading of the docs thus far I believe that I can do this in two ways
- Loading separate containers for each - in the sensse of 1 for Ubuntu, 1 for MariadB, 1 for Apache + PHP - of the above and linking them together
- Defining one container for the whole lot - i.e. one container per distro + db + server...
What I don't quite get yet is this - when I work with such a system and the DB is subjected to changes I would like to be able to have those changes in place the next time I reuse the same configuration. This would require that I save the container as a tar archive and then load it later when required? In that case it would make sense to have atleast those containers that are liable to be modified by the user as separate linked containers?
Finally - suppose I have got the full stack up and running (be it as separate linked containers or as one mega container). And now I browse to the IP address where it is all installed. The base Ubuntu box has no web server installed. Will I reach the Apache instance running inside the Docker container automatically or do I somehow need to tell the system of the need to do this?
I am a Docker beginner so some of my questions are probably rather naive.