-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Description
This proposal, deprecating #9459, is for a command-line tool for orchestration of multi-container apps, suitable for development environments, automated CI setups and staging and production deployments, and working fluidly with Docker Machine and Docker Swarm.
Based in large part on feedback to #9459 from the Docker community, we propose the following:
- Compose is a standalone command-line tool, rather than built into the Docker client binary.
- The initial release of Compose is directly based on the Fig codebase, rather than written from scratch, and focused around cleanup and any backwards-incompatible changes from Fig.
- A roadmap of features for Compose and (if deemed appropriate) the Docker engine, so as to achieve production-suitability and seamless integration with Swarm, is planned.
Separate tool
The arguments in favour of building Compose directly into the Docker client are based on usability issues we’ve observed with Fig:
- Newcomers to Docker find Fig more immediately easy to understand and relevant to their needs, so it makes sense for them to have that benefit out-of-the-box.
- People are often confused about the distinction between Fig and Docker, so it would be beneficial from a UX perspective if there were no distinction.
- Fig is “one more thing to install” that prevents users from getting up and running.
- Problems arise when versions of Fig and Docker are incompatible.
However, there are also usability arguments against building it in:
- The various Docker commands become context-sensitive (i.e. they behave differently based on the contents of the current directory) and overloaded with meaning (arguments can either designate literal container names or names in the configuration file).
- Docker users who aren’t interested in Compose’s features will nonetheless have to live with a tool that’s both physically and conceptually larger.
Furthermore, technical and social arguments strongly favour separation: the responsibilities of Compose and those of the current Docker client don’t overlap, and it’s better to avoid conflating non-coupled concerns in one codebase, because:
- It’ll make the codebase even larger.
- It’ll force both projects to share a release cycle, making it harder to experiment on Compose and to make changes to either one.
- It’ll put extra burden on the core maintainers.
- It’ll be harder to find issues and PRs if they all live in the same GitHub repository.
Furthermore, a separate tool will help guide the definition and maintenance of the Docker API(s), keeping the door open for a healthy ecosystem of alternatives.
Finally, it’s still possible to go carefully from a separate tool to an integrated one in the future; extracting a separate tool back out again, however, is much harder.
Based on Fig
Fig in its current state is a great orchestration tool for development/CI, and a usable one for simple production deployments. Its codebase is mature and well-understood, and doesn’t carry a lot of technical debt (though there are improvements which can and should be made!)
It would make an excellent starting point - and, given Compose is a new tool, we’d be free to make breaking changes from Fig’s logic for the first release.
Features roadmap
As well as a number of smaller features that have been requested for Fig (which will still be triaged and implemented where appropriate), several high-level features are needed to get Compose to a state where it’s suitable for multi-host production deploys. Compose’s priorities after the initial release will be identifying, designing and implementing these in collaboration with the community and users. Discussion for many of these is already ongoing on the Fig GitHub project.