When generating compose files for local, and cloud, deployments, different volume drivers need to be specified for the different cloud contexts. Using multiple --file directives to merge compose files seems a convenient way to support this scenario, however this causes docker compose up to throw a panic trying to merge the volume sections.
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version:
Client: Docker Engine - Community
Cloud integration: 1.0.7
Version: 20.10.2
API version: 1.41
Go version: go1.13.15
Git commit: 2291f61
Built: Mon Dec 28 16:12:42 2020
OS/Arch: darwin/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.2
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: 8891c58
Built: Mon Dec 28 16:15:28 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.3
GitCommit: 269548fa27e0089a8b8278fc4fc781d7f65a939b
runc:
Version: 1.0.0-rc92
GitCommit: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Output of docker context show:
You can also run docker context inspect context-name to give us more details but don't forget to remove sensitive content.
Description
When generating compose files for local, and cloud, deployments, different volume drivers need to be specified for the different cloud contexts. Using multiple --file directives to merge compose files seems a convenient way to support this scenario, however this causes
docker compose up
to throw a panic trying to merge the volume sections.Steps to reproduce the issue:
docker-compose.yml
docker-compose.azure.yml
docker --context azure compose up --file docker-compose.yml --file docker.compose.azure.yml
whereazure
is the name of your azure context.Describe the results you received:
Describe the results you expected:
The compose files to deploy successfully.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker version
:Output of
docker context show
:You can also run
docker context inspect context-name
to give us more details but don't forget to remove sensitive content.Output of
docker info
:Additional environment details (AWS ECS, Azure ACI, local, etc.):
Docker Desktop 3.1.0 (51484) Azure ACI