Automated Build on Docker hub is there a way to specify a Dockerfile?

So I have my automated build ( Docker hub web ui ) that points to my github repo. Then I want to have different Dockerfiles like Dockerfile.dev, Dockerfile.prod and so on.

  1. The problem is that it only locates the Dockerfile on the given directory
  2. The other problem is that it builds the image on that relative directory where Dockerfile is located. example: Repo is on “/” root directory then I add a /docker/dev/Dockerfile folder inside it so with this its relative path is on “/docker/dev/” and not on “/”.
1 Like

Would be great to be able to specify the name dockerfile, like in the cli.

Your understanding is correct. For now, you cannot specify specific Dockerfile and also the location you keep your Dockerfile, it is all the resources it can have access. You cannot even create symlinks to locate to parent folders. If we make changes, we would definitely let everyone know, like in cli.

It’s been months since the release of this functionality in Docker itself. Is there any ETA on when this might be available in Docker Hub?

there is a related issue open in hub-feedback https://github.com/docker/hub-feedback/issues/371

Any news on this? The issue on GitHub is locked for over a year now without further response.

What needs to update in the dockerfile section can someone help me to get a proper link on this path setting of dockerfile as am searching the solution but couldnt find anything on this and found same question on github and devopsforum.info also but didnt get solution any where so can some expert answer this clearly.
thanks in advance