git - Deploying Perl Docker Container to Elastic Beanstalk -


i building docker container pulls perl/mojolicious repo bitbucket having problems. have dockerfile this:

# docker-version 0.3.4        perl:latest maintainer  name myname@name.com  # update aptitude new repo run apt-get update  # install software  run apt-get install -y git # make ssh dir run mkdir /root/.ssh/  # copy on private key, , set permissions add repo-key /root/.ssh/id_rsa  # create known_hosts run touch /root/.ssh/known_hosts # add bitbuckets key run ssh-keyscan bitbucket.org >> /root/.ssh/known_hosts  run curl -l http://cpanmin.us | perl - app::cpanminus run cpanm mojolicious  run cachebuster=b953b35 git clone -b branch git@bitbucket.org:org/project.git  expose 8080  workdir project cmd hypnotoad script/project 

and, locally, upon docker build -t name/project . builds fine , says "successfully built."

i zipped repo-key file , fed elastic beanstalk, clicked upload , deploy (i deployed 2048 game sample, , tried replicate it).

this comes dockerrun.aws.json: no such file or directory. think strange because documentation says dockerfile or dockerrun.aws.json can used independently different needs. whatever, gave short, inconsequential, dockerrun.aws.json, so:

{     "awsebdockerrunversion": "1",     "ports": [         {"containerport": "8080"}     ],     "volumes": [] } 

it still fails , log states [cmd-appdeploy/appdeploystage0/appdeployprehook/04run.sh] command failed error code 1: , further docker container quit unexpectedly after launch.

can me troubleshoot these files?

i figured out. problem hypnotoad runs in background default , makes container die instantly. adding -f flag, runs in foreground , container persists. switched cmd entrypoint.

#... same above except last line  workdir project entrypoint [ "hypnotoad", "-f", "./script/project" ] 

you still have feed eb both dockerfile , dockerrun.aws.json no apparent reason, so, works without error.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

node.js - How to abort query on demand using Neo4j drivers -