I need to start a Jboss server when my container starts. When a container is created and then I log on it, I execute the command ./start-jboss.sh successfully. This file was created by me and it is in /home/jboss directory. However, when I try to fill Rancher fields, the container starts and stops (CrashLoopBackOff).
Does anyone have any example of how to complete these Rancher fields?
You can view the logs from the container and see what the error is that is causing the crash. You might try using the full path to the script instead of using a relative path.
My command is definitely being executed. It’s awful! But when I put a while true code after starting JBoss server, my application runs as expected and the container keeps alive. Does anyone know a better solution? Thanks.
Does your JBoss process run in the foreground, or does it run as a background process? A Docker container needs to have whatever process you call run in the foreground. If that script (start-jboss.sh) starts another process, and then exits, then Kubernetes will think that the container has died and kill the container and start a new one.