6
votes

I am getting empty Dockerfile in my Docker Hub repository when I am trying to set Automated Build. If I trigger the build:-

Build failed: Dockerfile not found at ./Dockerfile

I followed the steps from this page:- https://docs.docker.com/docker-hub/builds/

I pointed the docker hub repository to my github public repository and allowed the requested permissions as suggested.

Later on I renamed the "dockerfile" into "Dockerfile" thinking it may be due to the case sensitive file name - it didn't work either.

Can anybody help what I am doing wrong.

I also noticed someone experiencing similar problem in below thread but that was the case when Build showed "Pending". For me, the build shows "Error" and Dockerfile is empty.

Docker automated build shows empty Dockerfile

2

2 Answers

6
votes

I had a similar problem. In my case it was due to the fact that the Dockerfile was in lowercase. However renaming it locally does not change it on github, as it is not perceived as a change. After renaming it directly in the repository everything worked fine.

3
votes

After trying a bit (I created another automated build pointed it to same github repository and it still had same issue), finally I understood the fact that git pullwas not being triggered so nothing appeared in Dockerfile or README.md.

I simply edited the Readme file and pushed the updates to github which trigerred the build and Dockerfile and source code was pulled properly from github.

I will leave this answer here if in case somebody else stumble upon similar situation.