Automated Build: Multiple Dockerfiles in one repository

On Docker Hub, I can specify the actual name of the Dockerfile in the automated build, so I can have two Dockerfiles at the root and build two (or more) images from one repo.

I tried to do the same thing on Docker Cloud, but its not happy with the Dockerfile and won’t build.

Is there a trick to building more than one docker image from one repo?

Also, I still have the Docker Hub builds set up; seems redundant but it would be nicer to have it all in one place.

1 Like

Hi Jim, we’re working on converging Docker Hub and Docker Cloud builds. As you noticed, today these are two distinct build systems targeting the same registry and repositories. For now, we suggest you continue using Docker Hub for your builds if the features you need are not available in Docker Cloud.

Got it. Please make sure you don’t lose the ability to create multiple docker images from one repo when you merge them!

Docker Cloud (nee Tutum) build process allows you to nominate a folder for the Dockerfile.

So you can have multiple Dockerfile in a single repo provided they are in separate folders. But this is not great as the build process needs to be relative to the location of the Dockerfile; ideally you want several different Dockerfile at the root of your repo :scream_cat:

It’s annoying because Docker itself has supported nominating a specific file for some time now.

We’re looking into bringing this feature from Docker Hub into Docker Cloud. In the meantime, if you must have this feature, please continue to manage your autobuilds using Docker Hub. Sorry for the inconvenience.

@borja Is it safe to say that Docker Hub will remain the same for autobuilds? Meaning no features will be taken away when Docker Cloud comes out of beta?

@styfle That’s right.