Docker: strategy-advise for a rookie
Yes, one would usually have minimal docker images, i.e., one responsibility per image/container, with appropriate networking between them.
Yes, images are linear, there is only ever one unbroken line of FROMs. To merge two images, get the two Dockerfiles and see what they are doing; it should be pretty self explanatory. Then you can either craft a single new Dockerfile mixing and merging lines from the sources, or keep one of the original dependencies as your FROM, and just copy lines from the other original to a new Dockerfile.
You would use command in a docker-compose.yml in the same cases when you would give a command on the docker run line, in case you were running the container manually. That is, if you have an image which conveniently supports different commands, and were it would just be a waste to have a different image per command. So... if you find that you run your container with the same command in 99% of all cases, then put that CMD into the Dockerfile and remove it from the docker-compose.yml. If you find, instead, that you are using different commands all the time, then keep them in docker-compose.yml.