loft-sh / devpod

Codespaces but open-source, client-only and unopinionated: Works with any IDE and lets you use any cloud, kubernetes or just localhost docker.
https://devpod.sh
Mozilla Public License 2.0
8.42k stars 305 forks source link

Error when using array of env_file in docker-compose.yml #1140

Open Tichael opened 3 days ago

Tichael commented 3 days ago

What happened?
When trying to use multiple env files in docker-compose.yml, DevPod throw an error saying:

[11:40:48] info devcontainer up: load docker compose project: validating /Users/tichael/Projects/test_devcontainer/docker-compose.yml: services.devcontainer.env_file.0 must be a string
[11:40:48] error Try enabling Debug mode under Settings to see a more verbose output
[11:40:48] fatal run agent command: Process exited with status 1

What did you expect to happen instead?
I expected that devpod would have no problem with it since the latest Docker Compose format support this (see official documentation here) and creating a dev container with the same files from VS Code works without issue.

How can we reproduce the bug? (as minimally and precisely as possible)
Create a folder with three files:

File content:

Local Environment:

DevPod Provider:
Local Docker installation (Docker Desktop v4.31.0, Docker Engine v26.1.4, Docker Compose v2.27.1-desktop.1)

Anything else we need to know?
Like I said earlier, creating the dev container with Visual Studio Code works without any issue. So I don't know what difference DevPod is doing with its Docker Compose implementation.