Skip to content

Fix envbuilder build failure from unset _REMOTE_USER_HOME during feature installs#29

Merged
bmorton merged 6 commits into
mainfrom
copilot/fix-devcontainer-install-issue
Jun 19, 2026
Merged

Fix envbuilder build failure from unset _REMOTE_USER_HOME during feature installs#29
bmorton merged 6 commits into
mainfrom
copilot/fix-devcontainer-install-issue

Conversation

Copilot AI commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

The Build Envbuilder CI job fails while installing the claude-code feature:

cp: cannot stat '/.local/bin/claude': No such file or directory
error: do build: ... exit status 1: no fallback image has been specified

Coder builds workspaces with envbuilder, which injects only _CONTAINER_USER and _REMOTE_USER into feature install.sh runs — never _REMOTE_USER_HOME. The feature's final step expands to cp /.local/bin/claude ... and aborts the build. The devcontainer CLI sets the variable, so only the envbuilder path breaks.

Changes

  • .devcontainer/Dockerfile: declare the home-dir variables envbuilder omits, so feature installs can locate the target user's home:

    ARG _REMOTE_USER_HOME=/home/node
    ARG _CONTAINER_USER_HOME=/home/node

Why ARG

  • envbuilder appends feature RUN steps after this Dockerfile in the same stage, so the ARGs stay in scope and supply the missing values.
  • Unlike ENV, ARGs don't persist into the running container's environment.
  • Under the devcontainer CLI the ARG scope resets and the CLI sets these itself — no-op there.

Scope

Benefits any feature whose install.sh reads _REMOTE_USER_HOME/_CONTAINER_USER_HOME, not just claude-code.

Copilot AI changed the title Fix devcontainer install failure from kubectl postCreateCommand Fix devcontainer startup failure and add CI that exercises it Jun 19, 2026
Copilot AI requested a review from bmorton June 19, 2026 17:16
@bmorton bmorton marked this pull request as ready for review June 19, 2026 17:19
Copilot AI changed the title Fix devcontainer startup failure and add CI that exercises it Fix devcontainer up failure caused by UID/GID remap collision with sshd feature Jun 19, 2026
Copilot AI changed the title Fix devcontainer up failure caused by UID/GID remap collision with sshd feature Catch Coder/envbuilder startup failures in CI; pin dev container to node user Jun 19, 2026
Copilot AI changed the title Catch Coder/envbuilder startup failures in CI; pin dev container to node user Fix envbuilder build failure from unset _REMOTE_USER_HOME during feature installs Jun 19, 2026
@bmorton bmorton merged commit 1b95ae6 into main Jun 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants