I currently have created a base play java sample application. I then ran the:
activator docker:stage
According to some other posts, I updated the Docker file to this:
FROM dockerfile/java
MAINTAINER Jay B <jay._____@_____.net>
EXPOSE 9000
ADD files /
WORKDIR /opt/docker
RUN ["chown", "-R", "daemon", "."]
RUN ["chmod", "+x", "bin/play-sample"]
USER daemon
ENTRYPOINT ["bin/play-sample"]
CMD []
I then created the Dockerrun.aws.json
{
"AWSEBDockerrunVersion": "1",
"Ports": [{
"ContainerPort": "9000"
}]
}
I then created an EBS environment with a micro 2 and a MySQL instance (even though the I am just trying to get the basic app started).
I then manually got to the aws EBS web page and upload the zipped directory of the files and the two Docker files. The upload appears to be successful and in the logs I can see the localhost:9000 printout.
But if I try and redeploy my application (that works on an existing EC2 instance), I get errors like this:
[2014-12-15T01:56:15.114Z] INFO [7439] - [CMD-AppDeploy/AppDeployStage1] : Starting activity...
[2014-12-15T01:56:15.122Z] INFO [7439] - [CMD-AppDeploy/AppDeployStage1/AppDeployEnactHook] : Starting activity...
[2014-12-15T01:56:15.133Z] INFO [7439] - [CMD-AppDeploy/AppDeployStage1/AppDeployEnactHook/00flip.sh] : Starting activity...
[2014-12-15T01:56:16.624Z] INFO [7439] - [CMD-AppDeploy/AppDeployStage1/AppDeployEnactHook/00flip.sh] : Activity execution failed, because: command failed with error code 1: /opt/elasticbeanstalk/hooks/appdeploy/enact/00flip.sh
nginx: [emerg] no host in upstream ":9000" in /etc/nginx/conf.d/elasticbeanstalk-nginx-docker-upstream.conf:2
nginx: configuration file /etc/nginx/nginx.conf test failed
Failed to start nginx, abort deployment (Executor::NonZeroExitStatus)