Container succesfully starts, then stops

Hello everyone,

I’m new to Docker and I’m trying to build a container from a Dockerfile.
This goes without problems and also seems to start normally, but it immediately stops.
When I specify the -d flag when executing the docker run command, the container also starts and then stops.
Of course I can interactively start the container and then disconnect with ctrl-p and ctrl-q, but I was wondering if it is possible to start it with only one run command.

Thanks in advance!


The same problem suddenly appeared on my side with the -d flag. The -d flag not working at all.

a9aa4eea7101 ubuntu “bash” 36 seconds ago Exited (0) 35 seconds ago