Improve support for newer Docker Compose and environment variable substitution with Swarm #133
Labels
dependencies
Pull requests that update a dependency file
enhancement
New feature or request
maas
MaaS Workstream
Milestone
As documented here, the
docker stack
command doesn't support environmental variable substitution in the same way thatdocker-compose
does. To work around this, DMOD has generated temporary config yaml files by preprocessing them usingdocker-compose config
. This outputs the contents of a valid Compose file supplied to it, either as the implied default or explicitly using the-f
flag, after performing variable substitution.However, as of Compose versions >= 2.x, this won't work. Once adhering to the Compose V2 spec, the
docker-compose config
command omits theversion
element, leading to problems with Swarm interpreting the version of the Compose file specification being used.It is possible (at least for now) to control whether to "Use Docker Compose V2" in the General section of Docker Desktop settings. But this may not always be a sufficient workaround, and a better solution could become necessary before a complete fix is supplied on the Docker side.
The text was updated successfully, but these errors were encountered: