Docker Compose What’s New, What’s Changing, What’s Next
December 8, 2025 · 697 words · 4 min
We’ll walk through new Docker Compose features the team has built, share what we plan to work on nex
We’ll walk through new Docker Compose features the team has built, share what we plan to work on next, and remind you to switch to as soon as possible. Compose V1 support will no longer be provided after June 2023 and will be removed from all future Docker Desktop versions. If you’re still on Compose V1, we recommend you switch as soon as possible to leave time to address any issues with running your Compose applications. (Until the end of June 2023, we’ll monitor to address challenges related to V1 migration to V2.) In the we proposed the following timeline: We’ve extended the timeline, so support now ends after June 2023. Switching is easy. Type instead of in your favorite terminal. An even easier way is to choose Compose V2 by default inside Docker Desktop settings. Activating this option creates a symlink for you so you can continue using to preserve your potential existing scripts, but start using the newest version of Compose. For more on the differences between V1 and V2, see the in docs. During the past few months, the main effort of the team was to focus on improving the build experience within Compose. After opened in the Compose specification, we started to ship the following new features incrementally: Let’s dive deeper into those last two improvements. was introduced in Compose V2.4.0 GA and lets you use ssh resources at build time. Now you’re able to use your local ssh configuration or public/private keys when you build your service image. For example, you can clone a private Git repository inside your container or connect to a remote server to use critical resources during the build process of your services. The ssh resources are only used during the build process and won’t be available in your final image. There are different possibilities for using ssh with Compose. The first one is the new attribute of the build section in your Compose file: And you need to reference the ID of your ssh resource inside your Dockerfile: This example is a simple demonstration of using keys at build time. It copies a public ssh key, mounts the private key inside the container, and checks if it matches the public key previously added. It’s also possible to directly use the CLI with the new flag. Let’s try to use it to copy a private Git repository. The following Dockerfile adds GitHub as a known host in the ssh configuration of the image and then mounts the ssh local agent to clone the private repository: And using the docker compose build command will pass your local ssh agent to Compose. In Compose version V2.11.0, we introduced the ability to add platforms in the build section and let Compose do a cross-platform build for you. The following Dockerfile logs the name of the service, the targeted platform to build, and the platform used for doing this build: This Compose file defines an application stack with two services (A and B) which are targeting different build platforms: Be sure to create and use a build driver that allows you to build multi-arch images: To use the multi-arch build feature: We also fixed issues, managed corner cases, and added features. For example, you can define a secret from the environment variable value: We’re now providing Compose binaries for windows/arm64 and linux/riscv64. We overhauled the way Compose manages .env files, environment variables, and precedence interpolation. Read the to learn more. To see all the changes we’ve made since April 2022, check out the or . The Compose team is focused on improving the developer inner loop using Compose. Ideas we’re working on include: If you’d like to see something in Compose to improve your development workflow, we invite your feedback in our . To take advantage of ongoing improvements to Compose and surface any issues before support ends June 2023, make sure you’re on Compose V2. Use the CLI or activate the option in Docker Desktop settings. To learn more about the differences between V1 and V2, check out the in our documentation.