Error while deploying Play Framework on Beanstalk AWS docker

I'm running a Play Framework app on AWS Beanstalk with Docker (Amazon Linux 2015.03 v1.4.1 64-bit running Docker 1.6.0).

Docker file:

FROM relateiq/oracle-java8
MAINTAINER XXXX
EXPOSE 9000
ADD files /
WORKDIR /opt/docker
RUN ["chown", "-R", "daemon", "."]
RUN ["chmod", "+x", "bin/app"]
USER daemon
ENTRYPOINT ["bin/app"]
CMD []

      

Dockerrun.aws.json

{
   "AWSEBDockerrunVersion": "1",
   "Ports": [{
       "ContainerPort": "9000"
   }]
}

      

When the instance is started first, I get about 1 minute when deployed as usual, after I go through a few pages, the error shows:

502 Bad Gateway

nginx/1.6.2

      

Error in ElasticBeanstalk logs:

Play server process ID is 1 This application is already running (Or delete /opt/docker/RUNNING_PID file).

      

I also get the /var/log/docker-events.log

following messages every 30 seconds:

2015-05-30T20:07:58.000000000Z d0425e47095e5e2637263a0fe9b49ed759f130f31c041368ea48ce3d99d1e947: (from aws_beanstalk/current-app:latest) start
2015-05-30T20:08:15.000000000Z d0425e47095e5e2637263a0fe9b49ed759f130f31c041368ea48ce3d99d1e947: (from aws_beanstalk/current-app:latest) die
2015-05-30T20:08:16.000000000Z d0425e47095e5e2637263a0fe9b49ed759f130f31c041368ea48ce3d99d1e947: (from aws_beanstalk/current-app:latest) start
2015-05-30T20:08:31.000000000Z d0425e47095e5e2637263a0fe9b49ed759f130f31c041368ea48ce3d99d1e947: (from aws_beanstalk/current-app:latest) die

      

Can anyone see my problem? Greetings.

+3
docker amazon-web-services playframework playframework-2.3


source to share


No one has answered this question yet

Check out similar questions:

3382
How is Docker different from a virtual machine?
1727
Should I use Vagrant or Docker to create an isolated environment?
1330
Copy files from host to Docker container
1182
Copying files from Docker container to hosting
1175
How do I get the IP address of the Docker container from the host?
1148
How to remove old Docker containers
1120
How to copy Docker images from one host to another without using a repository
890
How to list containers in Docker
792
How do I delete an image in Docker?
755
How to work with persistent storage (like databases) in docker



All Articles
Loading...
X
Show
Funny
Dev
Pics