title: AWS EB, Play Framework and Docker: Application Already running
body: <p>I am running a Play 2.2.3 web application on AWS Elastic Beanstalk, using SBTs ability to generate Docker images. Uploading the image from the EB administration interface usually works, but sometimes it gets into a state where I consistently get the following error:</p>
  
  <blockquote>
    <p>Docker container quit unexpectedly on Thu Nov 27 10:05:37 UTC 2014:
    Play server process ID is 1 This application is already running (Or
    delete /opt/docker/RUNNING_PID file).</p>
  </blockquote>
  
  <p>And deployment fails. I cannot get out of this by doing anything else than terminating the environment and setting it up again. How can I avoid that the environment gets into this state?</p>