Docker Community Forums

Share and learn in the Docker community.

Stack and Compose development

(Todd Morrison) #1

Can someone please give me some examples of how to run Stack’s locally?

Because Docker innovated and created:

  • Dockerfile
  • Docker-Compose

Many legacy source projects aren’t split out into separate repositories. Instead, they have a root docker-compose.yml file and a series of subdirectories that represent services included utilizing the “Build” image type.

It doesn’t appear Docker-cloud is compatible with this pattern. Instead, Docker Cloud wants the docker-compose migrated to Docker-stack, which doesn’t utilize local Dockerfile builds.

This both requires refactoring of legacy docker-compose repository patterns and doesn’t allow developers to run the full stack locally, which was possible with docker-compose.

It would be helpful if someone from Docker can give us some guidance, in detail, about how to keep using tools like Docker-Compose with Docker Cloud.


(Geoff Bowers) #2

I’m not sure how this would ever work. Docker Cloud always has to pull a built image; there is no option to build from within the stack.

We have separate docker-compose.yml and dockercloud-stack.yml files at the root of our project repos.

Truth be known we copy back the Stack file into our repo once its been tested on Docker Cloud. For example, the project I’m working on now has the following:

  • docker-compose.yml (standard local dev)
  • (local dev referencing AWS services)
  • dockercloud-prod.yml (production stack file)
  • dockercloud-stage.yml (stage/qa stack file)

Hope that helps.

(Todd Morrison) #3

This is fantastic feedback. We are also maintaining side-by-side configs, but find it a bit prone to human error when adding a new interaction requirement.

I would love to hear what Docker is planning on doing about this…