I am starting using Docker for my Kubuntu desktop. As I am following the tutorials, it has been helping me understanding how this works, but I am stuck with the following situation:
I would like to deploy containers for at least these three:
- Web server (Apache)
- SQL-compatible database (MariaDB/MySQL)
- Java custom SDK (OpenSDK-based)
Searching for how-tos, people highly recommend using Alpine-based base images as they only use 5-6 MB of disk storage, which is pretty good. And that would solve my problems for the web server and the database as long as there are already made base images in the Docker Hub.
But the problem is with the Java SDK, where I just build my very own customized development environment which needs to use a Ubuntu 16.04 base image. (I could port it to Alpine, but there would be too many problems that I would not like to solve).
If I understood how Docker works, if multiple dockerfiles are using the same base image, this is not necessary to be downloaded again, as it would be used by every container that require it.
Then, would be a good idea to use that Ubuntu 16.04 base image to also deploy the web server and the database (and more containers, if any)? Because using the mentioned Alpine versions in the Docker Hub would need to download their Alpine base images too (even if they are only 5 MB).
Thanks in advance.
Just to clarify: I DO NOT want to change the tools I am currently using, that is not the question, I just want to understand Docker and good practices with it.