educative.io

Educative

Docker image build failure unless Dockerfile is called Dockerfile

I’ve resolved this but want to flag it up:
I was trying to upload a Dockerfile. As I already had a different Dockerfile in my local directory where I prepped course materials I called this new one Dockerfile-educative. With this I got build failures when I tried to upload with non-helpful error messages.

I suspected it might be objecting to me not calling the file simply Dockerfile. When I uploaded the same file but just called Dockerfile it then worked.

Hi @Liam_Brannigan !

This is the naming convention followed for all Dockerfiles, this is because the autobuilder at hub.docker.com follows this convention that all Dockerfiles should be as follows

Dockerfile

“Dockerfile” followed by no extension (extension should be null).

Thank you for choosing Educative!

Hi @Moeel_Ashraf, I think that naming requirement should be documented because it is not a general standard for Dockerfiles. Anyone who gets that error message would never understand the issue from the build logs.

Thank you for your feedback, naming convention is mentioned in this course in this lesson that belongs to the same course

We will work on making the information for the naming criteria more explicit.