up hangs after compose up -d on a cold start (Node 26, Compose 5.6)

Ouverte
#1,354 0 commentaires 0 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@v-Kaniska244 y travaille déjà.

Depuis le 9/11/2026.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
48/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
docker-compose, node.js, typescript
Domaine
cli, devtools

Piste de recherche

Start by tracing the Docker events watcher around the startEventSeen log and the Compose up -d call described in the report; compare the cold start with the already-running container case. The report includes a minimal Compose configuration and a trace log, but no source files or tests. Done means identifying and fixing the hang so devcontainer up runs lifecycle commands and returns its JSON result on a cold start.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

devcontainer up hangs on a cold start of a Docker Compose config: docker compose … up -d finishes in about 2 s, the CLI logs startEventSeen for the container, and then nothing happens until it is killed. Lifecycle commands never run, although the container is up. VS Code's Dev Containers extension (0.469.0) brings up the same config fine, and devcontainer up against a container that is already running succeeds in about 1 s.

Minimal repro

.devcontainer/devcontainer.json:

{ "dockerComposeFile": "docker-compose.yml", "service": "devcontainer", "workspaceFolder": "/workspace", "remoteUser": "node", "postCreateCommand": "echo POSTCREATE_RAN" }

.devcontainer/docker-compose.yml:

name: minimaltest
services:
  devcontainer:
    image: node:24-trixie-slim
    command: sleep infinity
    volumes:
      - ..:/workspace
npx @devcontainers/[email protected] up --workspace-folder . --log-level trace

Expected: POSTCREATE_RAN and the JSON result.
Actual: the last line logged is Stop (1307 ms): Run: docker compose … up -d, and it hangs there. It hung on every cold start: 3 runs, killed after 3, 5 and 15 minutes.

Environment
  • @devcontainers/cli 0.80.0, through npx
  • Node v26.7.0
  • Docker Compose 5.6.1
  • Linux 7.3.0 x64 (CachyOS)

Not yet ruled out: Node 26. I haven't managed to run it on Node 24 yet. My guess, untested, is the CLI's Docker events watcher with Node 26 or Compose 5.6. I'll add a comment with the Node 24 result.

End of the trace log (minimal repro)
    image: node:24-trixie-slim
    networks:
      default: null
    volumes:
      - type: bind
        source: /tmp/claude-1000/-data-das974-typesmiths-hockey/50c8e17a-c525-45a6-94b5-bea4641c970f/scratchpad/repro/minimal
        target: /workspace
        bind: {}
networks:
  default:
    name: minimaltest_default
[2026-11-08T08:05:42.078Z] Start: Run: docker inspect --type image node:24-trixie-slim
[2026-11-08T08:05:42.286Z] Stop (208 ms): Run: docker inspect --type image node:24-trixie-slim
[2026-11-08T08:05:42.289Z] workspace root: /tmp/claude-1000/-data-das974-typesmiths-hockey/50c8e17a-c525-45a6-94b5-bea4641c970f/scratchpad/repro/minimal
[2026-11-08T08:05:42.289Z] No user features to update
[2026-11-08T08:05:42.290Z] Start: Run: docker compose --project-name minimaltest -f /tmp/claude-1000/-data-das974-typesmiths-hockey/50c8e17a-c525-45a6-94b5-bea4641c970f/scratchpad/repro/minimal/.devcontainer/docker-compose.yml build
[2026-11-08T08:05:42.402Z] time="2026-11-08T08:05:42Z" level=warning msg="No services to build"

[2026-11-08T08:05:42.405Z] Stop (115 ms): Run: docker compose --project-name minimaltest -f /tmp/claude-1000/-data-das974-typesmiths-hockey/50c8e17a-c525-45a6-94b5-bea4641c970f/scratchpad/repro/minimal/.devcontainer/docker-compose.yml build
[2026-11-08T08:05:42.407Z] Start: Run: docker inspect --type image node:24-trixie-slim
[2026-11-08T08:05:42.496Z] Stop (89 ms): Run: docker inspect --type image node:24-trixie-slim
[2026-11-08T08:05:42.499Z] Start: Run: docker build -f /tmp/devcontainercli-das974/updateUID.Dockerfile-0.80.0 -t vsc-minimal-7518ba447e9e4c65ca58398059df89903e42653d645ad30a20ae3704cc36c446-uid --platform linux/amd64 --build-arg BASE_IMAGE=node:24-trixie-slim --build-arg REMOTE_USER=node --build-arg NEW_UID=1000 --build-arg NEW_GID=1000 --build-arg IMAGE_USER=root /tmp/devcontainercli-das974/empty-folder
[2026-11-08T08:05:44.573Z] Stop (2074 ms): Run: docker build -f /tmp/devcontainercli-das974/updateUID.Dockerfile-0.80.0 -t vsc-minimal-7518ba447e9e4c65ca58398059df89903e42653d645ad30a20ae3704cc36c446-uid --platform linux/amd64 --build-arg BASE_IMAGE=node:24-trixie-slim --build-arg REMOTE_USER=node --build-arg NEW_UID=1000 --build-arg NEW_GID=1000 --build-arg IMAGE_USER=root /tmp/devcontainercli-das974/empty-folder
[2026-11-08T08:05:44.576Z] Docker Compose override file for creating container:
services:
  'devcontainer':
    image: vsc-minimal-7518ba447e9e4c65ca58398059df89903e42653d645ad30a20ae3704cc36c446-uid
    entrypoint: ["/bin/sh", "-c", "echo Container started\n
trap \"exit 0\" 15\n
\n
exec \"$$@\"\n
while sleep 1 & wait $$!; do :; done", "-", "docker-entrypoint.sh"]
    labels:
      - 'devcontainer.local_folder=/tmp/claude-1000/-data-das974-typesmiths-hockey/50c8e17a-c525-45a6-94b5-bea4641c970f/scratchpad/repro/minimal'
      - 'devcontainer.config_file=/tmp/claude-1000/-data-das974-typesmiths-hockey/50c8e17a-c525-45a6-94b5-bea4641c970f/scratchpad/repro/minimal/.devcontainer/devcontainer.json'
      - 'devcontainer.metadata=[{"postCreateCommand":"echo POSTCREATE_RAN","remoteUser":"node"}]'
[2026-11-08T08:05:44.576Z] Writing docker-compose.devcontainer.containerFeatures-1794125144576-9e5c278e-ae92-4f11-9449-df64dcedccd1.yml to /tmp/devcontainercli-das974/docker-compose
[2026-11-08T08:05:44.577Z] Start: Run: docker compose --project-name minimaltest -f /tmp/claude-1000/-data-das974-typesmiths-hockey/50c8e17a-c525-45a6-94b5-bea4641c970f/scratchpad/repro/minimal/.devcontainer/docker-compose.yml -f /tmp/devcontainercli-das974/docker-compose/docker-compose.devcontainer.containerFeatures-1794125144576-9e5c278e-ae92-4f11-9449-df64dcedccd1.yml up -d
[2026-11-08T08:05:45.878Z] Log: startEventSeen#data {"Type":"container","Action":"start","Actor":{"ID":"db5ae743ecd155a214ea2330dbe7414ff837bb7f96b98634ee913aab9223c9f0","Attributes":{"com.docker.compose.config-hash":"b72885f6d91e260cf6a7f37c403f9e96f393975a1a4ae4e98baf9696888dab0f","com.docker.compose.container-number":"1","com.docker.compose.depends_on":"","com.docker.compose.image":"sha256:4fe7a777e0aa8b1e5721fcc4f0490ad5d12577fa6e0e843d4326315644642f8e","com.docker.compose.oneoff":"False","com.docker.compose.project":"minimaltest","com.docker.compose.project.config_files":"/tmp/claude-1000/-data-das974-typesmiths-hockey/50c8e17a-c525-45a6-94b5-bea4641c970f/scratchpad/repro/minimal/.devcontainer/docker-compose.yml,/tmp/devcontainercli-das974/docker-compose/docker-compose.devcontainer.containerFeatures-1794125144576-9e5c278e-ae92-4f11-9449-df64dcedccd1.yml","com.docker.compose.project.working_dir":"/tmp/claude-1000/-data-das974-typesmiths-hockey/50c8e17a-c525-45a6-94b5-bea4641c970f/scratchpad/repro/minimal/.devcontainer","com.docker.compose.service":"devcontainer","com.docker.compose.version":"5.6.1","devcontainer.config_file":"/tmp/claude-1000/-data-das974-typesmiths-hockey/50c8e17a-c525-45a6-94b5-bea4641c970f/scratchpad/repro/minimal/.devcontainer/devcontainer.json","devcontainer.local_folder":"/tmp/claude-1000/-data-das974-typesmiths-hockey/50c8e17a-c525-45a6-94b5-bea4641c970f/scratchpad/repro/minimal","devcontainer.metadata":"[{\"postCreateCommand\":\"echo POSTCREATE_RAN\",\"remoteUser\":\"node\"}]","image":"vsc-minimal-7518ba447e9e4c65ca58398059df89903e42653d645ad30a20ae3704cc36c446-uid","name":"minimaltest-devcontainer-1"}},"scope":"local","time":1794125145,"timeNano":1794125145877240315}
[2026-11-08T08:05:45.884Z] Stop (1307 ms): Run: docker compose --project-name minimaltest -f /tmp/claude-1000/-data-das974-typesmiths-hockey/50c8e17a-c525-45a6-94b5-bea4641c970f/scratchpad/repro/minimal/.devcontainer/docker-compose.yml -f /tmp/devcontainercli-das974/docker-compose/docker-compose.devcontainer.containerFeatures-1794125144576-9e5c278e-ae92-4f11-9449-df64dcedccd1.yml up -d
Langage dominant
TypeScript
Étoiles
3k
Forks
473
Merge moyen
10 h 31 min
PR mergées (30 j)
9

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de devcontainers/cli

Toutes les issues de devcontainers/cli

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.