In real scenario docker container is used for individual service. For an example, if you want to create CI/CD pipeline between git server and jenkins, you can launch two container and link them. But if you want to configure all the settings as you mentioned above for automation, then you should launch one container(CentOS or Ubuntu) and install all the service manually. If all the service works fine, then create one image from that container using commit. Next time whenever you require same configuration, you can run the image. But, If you try to do with dockerfile, it is quite difficult to troubleshoot the dependencies and all.
Hope this will give you some idea.