The "docker run image" command freezes before terminating the command

And leaving me with non-working containers.
This is true for every image downloaded from Docker Hub with the pull command or via the command “docker run ” in the terminal window.
docker run hello-world and docker run busybox echo “hello from busybox” work perfectly!
This on both my RPI 4 and my RPI 5, both with 4GB of memory, running under Raspi OS Light Arm64 and updated.
I can install Caddy & WordPress working perfectly with a Docker compose file, but this does not work separately under Docker.
Does anyone have an idea (I’ve been searching like crazy) how this can be solved?
With greeting.

Example “Caddy”

******@raspberrypi:~ $ docker run caddy
{“level”:“info”,“ts”:1719396579.3467345,“msg”:“using config from file”,“file”:“/etc/caddy/Caddyfile”}
{“level”:“info”,“ts”:1719396579.3487308,“msg”:“adapted config to JSON”,“adapter”:“caddyfile”}
{“level”:“info”,“ts”:1719396579.350965,“logger”:“admin”,“msg”:“admin endpoint started”,“address”:“localhost:2019”,“enforce_origin”:false,“origins”:[“//localhost:2019”,“//[::1]:2019”,“//”]}
{“level”:“info”,“ts”:1719396579.3513947,“logger”:“tls.cache.maintenance”,“msg”:“started background certificate maintenance”,“cache”:“0x400051d900”}
{“level”:“warn”,“ts”:1719396579.3513324,“logger”:“http.auto_https”,“msg”:“server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server”,“server_name”:“srv0”,“http_port”:80}
{“level”:“info”,“ts”:1719396579.3522735,“logger”:“http.log”,“msg”:“server running”,“name”:“srv0”,“protocols”:[“h1”,“h2”,“h3”]}
{“level”:“info”,“ts”:1719396579.3530962,“msg”:“autosaved config (load with --resume flag)”,“file”:“/config/caddy/autosave.json”}
{“level”:“info”,“ts”:1719396579.353278,“msg”:“serving initial configuration”}
{“level”:“info”,“ts”:1719396579.3596017,“logger”:“tls”,“msg”:“cleaning storage unit”,“storage”:“FileStorage:/data/caddy”}
{“level”:“info”,“ts”:1719396579.3601844,“logger”:“tls”,“msg”:“finished cleaning storage units”}

Because you are attached to the standard streams of the container. It would be the same with compose where you probably use up -d to run in detached mode. hello world “works” because that just gives you an output and stops. It is about what runs inside the container.

Run docker run -d caddy, but properly running a server container requires more configuration, not to mention port forwarding.

PS.: When you share terminal outputs, code or logs, please, follow the formatting guide: How to format your forum posts