amit
amit

Reputation: 2331

elastic beanstalk can not find Dockerfile

When using eb CLI

eb init
eb create

i get an error:

ERROR: [Instance: i-003165df12360a5c4] Command failed on instance. Return code: 1 Output: Dockerfile and Dockerrun.aws.json are both missing, abort deployment.

It seems like the ZIP file sent to the S3 indeed only contains README.md file. but the local folder does contain the Dockerfile and

eb local run 

seems to work fine.

Any ideas?

Upvotes: 5

Views: 1943

Answers (2)

Samuel Fekete
Samuel Fekete

Reputation: 324

Answer: It's because the Dockerfile wasn't committed. (By default the EB CLI deploys the latest commit in the current branch).

I had the same problem, and figured out the reason after reading your question and answer. You probable had a new git repo with only a readme file. Once you deleted the .git directory, the EB CLI no longer treated your directory as a git repo.

Upvotes: 9

amit
amit

Reputation: 2331

Seems to be solved. After removing ".git" folder "eb create" worked. Seems like a bug in elastic beanstalk as i don't see why the existents of a subfolder should prevent eb from zipping the files in the directory...

Upvotes: 0

Related Questions