You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python devcontainer snippet: mount path join and mktemp -t portability #1763
Copilot raised two portability points against catalog/snippets/devcontainer/python/ when it was carried verbatim into ptr727/ESPHome-Config#177. Both were declined there because the fix belongs in the canonical snippet.
devcontainer.json mounts: each source joins ${localEnv:HOME}${localEnv:USERPROFILE}. On a Windows host where both are set, for example VS Code launched from Git Bash, the result is an invalid path such as C:\Users\x/c/Users/x/.ssh/..., and the container fails to start.
post-create.sh: mktemp -t uv-install.XXXXXX.sh relies on implicit temp-dir selection, and -t behaves differently across mktemp implementations. An explicit template such as "${TMPDIR:-/tmp}/uv-install.XXXXXX.sh" avoids that. It is low risk, since the script only runs inside the Linux container.
The same mount pattern probably appears in the other devcontainer snippets too.
The three bind mounts (~/.ssh/id_ed25519.pub, ~/.config/git/allowed_signers, ~/.config/gh) are required. On a host missing any of them, Docker rejects the mount before onCreateCommand runs, and the container does not start. Make them optional, or document the host paths the container expects.
A third case on the same devcontainer.json mounts, raised by CodeRabbit on ptr727/ESPHome-Config#178: a bind mount fails when its source does not exist on the host, so a contributor with no ~/.ssh/id_ed25519.pub, no ~/.config/git/allowed_signers, or no ~/.config/gh cannot start the container at all.
Options are to drop the mounts from the default snippet, move them to an opt-in config, or document the host prerequisites beside the snippet.
Activity
ptr727 commentedon Sep 24, 2026
CodeRabbit raised a third point on the same snippet in ptr727/ESPHome-Config#177:
~/.ssh/id_ed25519.pub,~/.config/git/allowed_signers,~/.config/gh) are required. On a host missing any of them, Docker rejects the mount beforeonCreateCommandruns, and the container does not start. Make them optional, or document the host paths the container expects.ptr727 commentedon Sep 24, 2026
A third case on the same
devcontainer.jsonmounts, raised by CodeRabbit on ptr727/ESPHome-Config#178: a bind mount fails when itssourcedoes not exist on the host, so a contributor with no~/.ssh/id_ed25519.pub, no~/.config/git/allowed_signers, or no~/.config/ghcannot start the container at all.Options are to drop the mounts from the default snippet, move them to an opt-in config, or document the host prerequisites beside the snippet.