
Re-using containers means that you can make changes to yourĮnvironment very quickly. Restart a service that has not changed, Compose re-uses the existingĬontainers. Only recreate containers that have changedĬompose caches the configuration used to create a container.
#ESSENTIAL ANATOMY 3 FOR WINDOWS WINDOWS#
If you use docker-compose on a Windows machine, seeĮnvironment variables and adjust the necessary environment Runs, if it finds any containers from previous runs, it copies the volumes from Preserve volume data when containers are createdĬompose preserves all volumes used by your services. A custom valueįor it can be defined with the -project-directory command line option. The default project directory is the base directory of the Compose file. You can setĬOMPOSE_PROJECT_NAME environment variable. The default project name is the basename of the project directory. Same service names, from interfering with each other

on a dev host, to create multiple copies of a single environment, such as when you want to run a stable copy for each feature branch of a project.You can make use of this project name in several different contexts: Multiple isolated environments on a single hostĬompose uses a project name to isolate environments from each other. Variables and moving a composition between environments.Only recreate containers that have changed.Preserve volume data when containers are created.Multiple isolated environments on a single host.The features of Compose that make it effective are: MacOS on Apple silicon, Windows, and Linux,įor more information about compatibility with the compose v1 command-line, see the docker-compose compatibility list. With other Docker command-line features, and allows it to run natively on Compose V2 also supports some of the newer additions to the specification,Ĭompose V2 has been re-written in Go, which improves integration Implementations by the Docker CLI and/or Engine, and deliver features faster to This allows us to include community proposals, experimental Making this change has enabled a number of enhancements, includingĪdding the compose command directly into the Docker CLI, being able to “up” aĬompose application on cloud platforms by simply switching the Docker context,Īnd launching of Amazon ECS and Microsoft ACI.Īs the Compose specification evolves, new features land faster in the Docker CLI.Ĭompose V2 relies directly on the compose-go bindings which are maintained as part Makes a clean distinction between the Compose YAML file model and the docker-compose Introduction of the Compose specification Refer to the Installing Compose section for detailed instructions. Set up Compose V2 to act as a drop-in replacement of the previous docker-compose.

If you rely on using Docker Compose as docker-compose (with a hyphen), you can Run Compose V2 by replacing the hyphen ( -) with a space, using docker compose, To support most of the previous docker-compose features and flags. The new Compose V2, which supports the compose command as part of the DockerĬompose V2 integrates compose functions into the Docker platform, continuing

