How to debug a permanent restarting container?

Hi,
i try to start the Flexnet-License-Server in a container.
I created a docker.compose.yml:
version: ‘3.1’

services:
license-server:
image: wangsl2001/flexnet-centos7.9:20220102
restart: always

It’s minimalistic. But when i run “docker compose up” i get permanently:
flexnet-license-server-1 exited with code 0
flexnet-license-server-1 exited with code 0
flexnet-license-server-1 exited with code 0
flexnet-license-server-1 exited with code 0
flexnet-license-server-1 exited with code 0
flexnet-license-server-1 exited with code 0

I don’t know how to debug this. I can’t do “docker exec -it flexnet-license-server-1 /bin/bash” or “docker logs”.
I’m wondering why it always restarted, the docker-compose.yml is nearly empty.
How can i get information what’s running wrong. Or is the image broken ?
How can i make an image from this server myself ?

Thankful for any hint.

Bernd

Hi,
i did a “run --rm -it --name flexnet-test wangsl2001/flexnet-centos7.9:20220102 bash”, that went fine. Container is running and i have a shell.
So the problem seems to be in my docker-compose.yml.
Bernd

I talked about this on the 6th Docker Community All-Hands

If it stops, then your command finished without an error. You need a command that runs forever keeping the container alive.

PS.: Please, fomat your post using code blocks (not just here on the forum, everywhere where you need to share code) so we will understand it without missing indentation and altered content.