devcontainers / ci

A GitHub Action and Azure DevOps Task designed to simplify using Dev Containers (https://containers.dev) in CI/CD systems.
MIT License
350 stars 56 forks source link

Github Actions failed at postCreateCommand phase #254

Closed vinh0604 closed 1 year ago

vinh0604 commented 1 year ago

Hi DevContainer CI maintainers, Our Github Actions jobs are currently failed to start the devcontainer during the postCreateCommand with the following error:

[2023-07-28T08:03:52.308Z] search fclqd05oofmu3jo3usbz0f0p3a.cx.internal.cloudapp.net

  [2023-07-28T08:03:52.316Z] Setting dockerd Azure DNS.

  [2023-07-28T08:03:53.373Z] the input device is not a TTY

  [2023-07-28T08:03:53.375Z] postCreateCommand failed with exit code 1. Skipping any further user-provided commands.

  Error: Command failed: /bin/sh -c echo 'dummy'
      at YY (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:235:130)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async Rl (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:227:4396)
      at async yl (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:227:3741)
      at async Sl (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:227:2945)
      at async Js (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:227:2389)
      at async sAA (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:462:1346)
      at async mK (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:462:964)
      at async mAA (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:479:3660)
      at async LC (/usr/local/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:479:4775)

  Error: Dev container up failed: Command failed: /bin/sh -c echo 'dummy' (exit code: undefined)
  The postCreateCommand in the devcontainer.json failed.
  Error: Command failed: /bin/sh -c echo 'dummy'

The jobs were working normally until today and only started to failed a few hours back. We tried to start the devcontainer locally as well as on Github Codespaces, but in both environments, we can start the devcontainer normally.

What could be a potential issue here and could you give us some pointer to check further?

Thanks and regards, Vinh.

Justin-Hsu-Customink commented 1 year ago

If you are using devcontainers/ci@v0.2 in your github action workflow, try bumping to devcontainers/ci@v0.3.

kennethredler commented 1 year ago

Cli 0.5.2 fixes this https://github.com/devcontainers/cli/issues/606