devpod icon indicating copy to clipboard operation
devpod copied to clipboard

can't start container with docker compose

Open pacidic opened this issue 10 months ago • 1 comments

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

pacidic avatar Feb 22 '25 22:02 pacidic

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.

oldgalileo avatar Mar 10 '25 03:03 oldgalileo

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar May 10 '25 02:05 github-actions[bot]

This issue was closed because it has been inactive for 30 days since being marked as stale.

github-actions[bot] avatar Jun 09 '25 02:06 github-actions[bot]