Lucee starting up issues in docker container

We are in the process of automating deployments. We have customised the docker image of lucee for our application. It’s been set up with Apache connector mod_cfml. I have a start up script, which starts the processes as follows

set -m
apachectl start
sleep 20
/usr/local/tomcat/bin/ run

However the application doesn’t run away straight away. On restart of the docker container it works perfectly. The issue seems to be some of the components/libraries are not included when it starts up first. I’ve tried to move this order around. Or manually restarting the processes.

The issue is that in CI/CD pipelines, it’s hard to restart the container before it runs the automated tests. I would appreciated, if someone can assist me with this please.

Don’t forget to tell us about your stack!

OS: ???
Java Version: ???
Tomcat Version: ???
Lucee Version: ???

Without the code & config, os or any useful details, the only thing anyone could offer you is suggestions.

run a rhel clone such as alama linux
Move off docker, run a kvm
do a manual full lucee install
disable selinux
try again.