can't start container with docker compose
What happened?
When I run devpod up . --ide none --recreate from within the directory that contains the .devcontainer.json and docker-compose.config.yml listed below, the container refuses to start:
23:16:11 info Container default-ne-1bedc-devcontainer-1 Creating 23:16:11 info Container default-ne-1bedc-devcontainer-1 Created 23:16:11 info Container default-ne-1bedc-devcontainer-1 Starting 23:16:11 info Container default-ne-1bedc-devcontainer-1 Started 23:16:18 info Waiting for devpod agent to come up...
With --debug, I get:
23:21:33 debug execute inject script 23:21:33 debug done exec 23:21:33 debug done inject 23:21:33 debug done injecting 23:21:33 debug Inject Error: Error response from daemon: container f1e35848f16adc30fcf583cf39b808a97deb8d13ff4775c86a4e571785b3ec56 is not running
What did you expect to happen instead?
I'd expect the container to start up like it does without a docker compose file and specifying "image": "ubuntu:latest" directly in the devcontainer.json file.
How can we reproduce the bug? (as minimally and precisely as possible)
docker-compose.config.yml:
services:
devcontainer:
image: ubuntu:latest
hostname: devpod
network_mode: host
user: 1000:1000
volumes:
- .:/workspaces:cached
My devcontainer.json:
{
"dockerComposeFile": "docker-compose.config.yml",
"service": "devcontainer",
"workspaceFolder": "/workspaces"
}
Local Environment:
- DevPod Version: v0.6.13
- Operating System: linux
- ARCH of the OS: AMD64
DevPod Provider:
- Local/remote provider: docker
Ran into this same issue. The dev container / service works fine when not brought up by docker-compose.
I can see that the container does start, it just exits very quickly. Checking the logs of the container shows the echo "Container started".
Happy to share the setup if that would help debugging.
This issue is stale because it has been open for 60 days with no activity.
This issue was closed because it has been inactive for 30 days since being marked as stale.