I am trying to deploy my application to Elastic Beanstalk (docker is running), but during deployment 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, the Dockerrun.aws.josn file is not required if the Dockerfile is present, and I see no reason why we should have it.
My Dockerfile looks like this:
FROM ubuntu:16.04
RUN rm -rf /var/www
RUN mkdir /var/www
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y nginx
RUN apt-get install -y php7.0 php7.0-fpm php7.0-xml php7.0-curl
RUN apt-get install -y php7.0-mysql
RUN apt-get install -y php7.0-mbstring
RUN apt-get install -y php7.0-mcrypt
RUN apt-get install -y git
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 Docker file. I gave an example of the file structure and the dockerfile file from http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/docker-singlecontainer-deploy.html
We use the same Docker file to create an application using CodeBuild, and it does not have an error. also locally I can create this application without any problems.
.