Issue with interactive docker start

I start a docker as follows -

sudo docker run -p 8080:8080 --restart always -v volume:volume
(Keycloak is a authentication service and I am using their docker img)

I am running it in interactive mode. Now, what I see is that after about 7-8 hrs, the docker just shuts down.

Some observations:

  1. I see that the docker container restarted once. Saw it in tge logs.

  2. After some time (about 7-8 hrs) it just went down. All I see in the logs is:
    The JBoss App server received a HUP signal.
    After this all the services running on this docker container started going down.

  3. Almost looks like this container really went down and never started again inspite of using --restart always.

Some questions -

  1. Could this happen because I ran it in interactive mode? Here, it is dumping logs continously to a console - even if I close it. If so, will running the docker with “-d” option solve this?

  2. How do I look for system logs in the container? I know you can just start the stopped container manually again. I did that and then checked for system logs. But in the /var/log/ folder, I dont see anything at all. All I see is some logs that are displayed on console - basically the app logs from the service I am running.

  3. Any other inputs or suggestions for this issue?

Thanks,
Anand