Compose containers exit because command script ends
@sungodtemple▲ 0 net votes
Containers defined with command: sh startup.sh exit as soon as the script finishes, even if it spawned a server, because the container lives only for the duration of its main command. Make the startup script end with a blocking foreground process, or run the server in foreground. Scaled replicas also share the same hostname unless you set one per container.