13

I'm trying to deploy my application to Elastic Beanstalk (running docker) but during the deploy it always fails with something like this:

Activity execution failed, because: cat: /var/app/current/Dockerrun.aws.json: No such file or directory cat: /var/app/current/Dockerrun.aws.json: No such file or directory 2ba4cc7f9cb0a66db0ab1be8736ba96bffbb1c96a219cf5e888f99a964ae4f2a 

As far as I understand Dockerrun.aws.josn file is not required if Dockerfile is present and I don't see any reason why we should have it.

My Dockerfile is like this:

FROM ubuntu:16.04 # create source directory RUN rm -rf /var/www RUN mkdir /var/www # update and upgrade ubuntu RUN apt-get update && apt-get upgrade -y # install nginx RUN apt-get install -y nginx # install php 7 RUN apt-get install -y php7.0 php7.0-fpm php7.0-xml php7.0-curl # install php mysql RUN apt-get install -y php7.0-mysql # install php mbstring RUN apt-get install -y php7.0-mbstring # install php mcrypt RUN apt-get install -y php7.0-mcrypt # install git RUN apt-get install -y git # install zip and unzip RUN apt-get install -y zip unzip ADD . /var/www EXPOSE 80 CMD ["/usr/sbin/nginx", "-c", "/etc/nginx/nginx.conf"] 

Our application source files are in the same directory as the Dockerfile. I took the example of file structure and the dockerfile it self from http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/docker-singlecontainer-deploy.html

We use the same Dockerfile to build the app using CodeBuild and it has no error. also locally I can build that app without any problems.

Any help would be greatly appreciated.

1
  • 1
    If anyone has the same issue - I contacted AWS suppord and found out that it is not actually a error, more like informative thing. What killed the deploy here was a issue with nginx conf. Commented Feb 3, 2017 at 10:31

1 Answer 1

5

As mentioned in the comment bellow the issue might be not in the missing Dockerrun.aws.json but in something else.

To pin point the actual issue I've had to ssh into the box and check the logs. In my case it was

eb ssh less /var/log/eb-docker/containers/eb-current-app/unexpected-quit.log 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.