How to upload my Dockerfile to docker hub?

Hi,

I found some public images on hub.docker.com has the Dockerfile tab, e.g. this one. But the images I pushed does not have this tab, and I found no way to upload/set a Dockerfile for my images.

How can I upload/attach a Dockerfile to my images?

2 Likes

Hi, even I was looking for that few days ago. May be uploading a Dockerfile is only for premium/paid users.
What I have done is I used the Full Description text box in the repository for my Dockerfile.
You can also do it, if its fine with you.

Hi @siddharth67,

Even easier…If you check out the Create button on top of the docker hub site, you will find a Create Automated Build option. Go with it, it builds automatically from your github repository and add the Dockerfile for you as well :slightly_smiling:

Hope it helps~

3 Likes

The dockerfile is included in an automated build.
Free accounts can do this, but there are some setup steps, namely linking your docker hub account to a git account (github or bitbucket).
This page has all the setup steps:

What about users that do not want to link a github/bitbucket account or use automated builds? How do we share a Dockerfile in that case?