I am VERY new to Docker and I looking for a confirmation of my views and my usage of Docker in my use-cases.
I'll try it with examples:
I have a T3 application. Every tier is a basic requirement (lets say persistence with postgres, application with java, presentation with php). Because I find for any tier an image on docker-hub I use them and compose them to have 3 running containers which exchange their data via network. Correct?
I have an application that is in java and needs to work on the files of centos (e.g. read logs). There is not interaction - only stdout or files. Docker-images for centos are available, for java too. There is no easy way to create a Dockerfile with a double FROM. So I build my own image from centos and do ADD/COPY/RUN to get a java JDK into it. Correct?
I can do in docker-compose.yml also actions that I can have in dockerfile too (e.g. workdir and command). Is it better to keep it in dockerfile and see docker-compose only for assembling multiple containers OR should I put as many things into docker-compose as I can?