Repository navigation
fix(devcontainers): restore XDG dirs so mise works under nested volume mounts - #150
Merged
Merged
Conversation
…e mounts 24afdcf replaced mkdir -p /home/node/.local/share/fish with /home/node/.local, dropping the .local/share level that mkdir -p had created as a side effect. Consuming projects still mount a *-fish-data volume at ~/.local/share/fish, and Docker invents a missing mount parent as root:root -- so .local/share became root-owned and mise could no longer create ~/.local/share/mise. Every consuming devcontainer fails 'mise install' on its next rebuild. Creates .local/share, .local/state, .config and .cache node-owned (the four dirs mise writes to) in both affected images. Reproduced against the published image and verified with a volume mounted at the nested path -- a plain docker run does not surface it. CI now asserts .local/share is node-owned, since the failure is silent until a consumer rebuilds. Also tightens comments across the Dockerfiles and renovate.json5: claude-code 45%->38% comment lines, renovate.json5 42%->30%. Package-manifest lists are left alone -- one short line per package is the useful form.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Restores
~/.local/share(and the other XDG dirs mise uses) to theclaude-codeand repo devcontainer images, fixingmise installfailing in every consuming project. Also tightens comments across the Dockerfiles andrenovate.json5.Why
Regression from #146. That PR replaced
in the
mkdir -plist. The old path created.local/shareas a side effect ofmkdir -p; the new one stops a level short, so.local/shareis absent from the published image:Consuming projects still mount a
*-fish-datavolume at/home/node/.local/share/fish— unchanged by the zsh migration. When Docker mounts a volume at a nested path whose parent is missing from the image, it creates that parent itself, owned by root:mise writes
~/.local/share/miseas uid 1000 and is refused:Running containers are unaffected only because they hold pre-#146 image IDs. Every consuming project breaks on its next rebuild. Reported by another session after a blog devcontainer's
updateContentCommandexited 1.Changes
claude-codeand.devcontainer: create.local/share,.local/state,.config,.cachenode-owned — the four dirsmise doctorreports.claude-bunis unaffected (no mise, never created them)..local/shareis node-owned in bothci.ymlandbuild-claude-code.yml.claude-code45%→38% comment lines,renovate.json542%→30%. Per-package manifest lists left alone — one short line per package is the useful form.Notes
Verification needs the nested mount. A plain
docker runon the image will not reproduce this. Confirmed both directions:.local/sharemise install:latest+ fish volumeroot rootnode nodejq@1.7.1installedThe vestigial mount is deliberately not addressed here. Consumers still mount
*-fish-dataat a fish path while the image ships zsh. Renaming it requires a consumer-side migration, and the image must keep working with the mounts that exist today — which is exactly what this PR restores. Worth a separate issue.Why it wasn't caught: the failure is invisible without a nested volume mount, so image-level CI checks and a local
docker runboth passed. The new assertion closes that by checking the directory exists node-owned in the image, which is what prevents Docker from inventing it.