-
Notifications
You must be signed in to change notification settings - Fork 492
Open
Labels
Description
What happened?
Running a docker compose setup with devpod fails with an error:
The Compose file '/home/x/CodiumProjects/passman/.devcontainer/docker-compose.yml' is invalid because:
'name' does not match any of the regexes: '^x-'
You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/
devcontainer up: start container: build and extend docker-compose: exit status 1
run agent command: Process exited with status 1
I think this is because devpod still uses v1 internally and uses docker-compose command. As a workaround I created an alias for my shell (docker-compose -> docker compose) and I renamed the binary in /usr/bin/.
What did you expect to happen instead?
The devcontainer builds and runs normally.
How can we reproduce the bug? (as minimally and precisely as possible)
My devcontainer.json:
{
"name": "Passman Dev Container",
"dockerComposeFile": ["./docker-compose.yml"],
"service": "ubuntu"
}name: dev
services:
ubuntu:
image: ubuntu:24.04Local Environment:
- DevPod Version: v0.6.15
- Operating System: linux
- ARCH of the OS: AMD64
DevPod Provider:
- Local/remote provider: docker
Anything else we need to know?