Docker-compose daemon exiting

So I’m using the Play framework with Docker (specifically using this image), and trying to get a server up and running.


$ sudo docker-compose run web activator run

works just as expected: the webserver starts up and stays up to accept incoming requests.

But then I try

$ sudo docker-compose up -d


$ sudo docker-compose logs
web_1      | [info]     [SUCCESSFUL ] org.ow2.asm#asm-analysis;4.1!asm-analysis.jar (16ms)
web_1      | [info] downloading file:/activator-1.3.2/repository/org.ow2.asm/asm-util/4.1/jars/asm-util.jar ...
web_1      | [info]     [SUCCESSFUL ] org.ow2.asm#asm-util;4.1!asm-util.jar (32ms)
web_1      | [info] Done updating.
web_1      | 
web_1      | --- (Running the application from SBT, auto-reloading is enabled) ---
web_1      | 
web_1      | [info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
web_1      | 
web_1      | (Server started, use Ctrl+D to stop and go back to the console...)
web_1      | 
web_1      | 
web_1      | [success] Total time: 356 s, completed May 11, 2015 6:44:20 AM
shallwedebate_web_1 exited with code 0
amos@lub:/ShallWeDebate$ sudo docker-compose ps
      Name             Command             State              Ports       
shallwedebate_da   /docker-           Up                 5432/tcp         
shallwedebate_we   activator run      Exit 0                              

It exits! Why is that? Why doesn’t it keep running like when I do docker-compose run?

Source: New Questions

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.