Compose V1 no longer receives updates and will not be available in new releases of Docker Desktop after June 2023.
Compose V2 is included with all currently supported versions of Docker Desktop. For more information, see Migrate to Compose V2.
Environment variables can help you define various configuration values. They also keep your app flexible and organized.
This section covers:
- The various ways you can set environment variables in Compose.
- How environment variable precedence works.
- The correct syntax for an environment file.
- Changing pre-defined environment variables.