AWS EB Deploy Shows Missing Dockerrun.aws.json After Deployment

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

# 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 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.

.

+4

Source: https://habr.com/ru/post/1668263/


All Articles