I would use ENTRYPOINT to run the script when docker starts.
Sort of
ENTRYPOINT myamazingbashscript.sh
The syntax may be turned off, but you get the idea
The script should start both services, and finally should tail -f the tomcat logs (or any logs).
tail -f will prevent the container from exiting since the tail -f command will never exit, and it will also help you see what tomcat does
Make -f log dockers to view logs after starting docker
Please note that the container will not exit u, maybe it will execute into it ... docker exec -it containerName bash
This allows you to sniff inside the container.
Generally, the best approach is to use two services in one container, as it breaks down separation of problems and reuse, but you may have good reasons.
To build a docker assembly, then run using docker run as indicated by u.
If you decide to go to a container with two containers, then you will need to set the ports between the containers so that they can talk to each other. You can share files between containers using volume_from
source share