I have created an application in Elastic Beanstalk to host a play framework 2 app there using instructions from this project.
I have packaged the project exactly like Docker needs but when I upload the final zip to the application I receive a permission denied error in this flow:
- Environment update is starting.
- Deploying new version to instance(s).
- Successfully pulled dockerfile/java:latest
- Successfully built aws_beanstalk/staging-app
- Docker container quit unexpectedly after launch: Docker container quit unexpectedly on Fri Sep 12 23:32:44 UTC 2014: 2014/09/12 23:32:39 exec: "bin/my-sample-project": permission denied. Check snapshot logs for details.
I have spent hours on this without any success.
This is the content of my root Dockerfile:
FROM dockerfile/java
MAINTAINER Cristi Boariu <myemail>
EXPOSE 9000
ADD files /
WORKDIR /opt/docker
RUN ["chown", "-R", "daemon", "."]
USER daemon
ENTRYPOINT ["bin/mytweetalerts"]
CMD []
Any hint how to solve this issue?
Add a chmod command to make your file executable:
So your Dockerfile will be:
Here's what I did to solve this same issue, though I'm not sure which part specifically solved it.
My DockerFile looks like:
See https://www.playframework.com/documentation/2.3.x/ProductionConfiguration for info on setting jvm memory.
My Dockerrun.aws.json (also required) looks like:
Finally my play application lives in
files/opt/docker
with the run script indocker/bin
. All this is zipped up and sent to EB.