Fix CI permissions with container UID mismatch; document proper solution#46
Draft
Fix CI permissions with container UID mismatch; document proper solution#46
Conversation
Co-authored-by: kaladron <377531+kaladron@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix new test failures in CI environment
Fix CI container permissions by running as root
Feb 15, 2026
Co-authored-by: kaladron <377531+kaladron@users.noreply.github.com>
Co-authored-by: kaladron <377531+kaladron@users.noreply.github.com>
Copilot
AI
changed the title
Fix CI container permissions by running as root
Fix CI container permissions and document proper solution
Feb 15, 2026
Co-authored-by: kaladron <377531+kaladron@users.noreply.github.com>
Copilot
AI
changed the title
Fix CI container permissions and document proper solution
Fix CI permissions with container UID mismatch; document proper solution
Feb 15, 2026
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.
CI fails when
actions/checkout@v4attempts to write state files:EACCES: permission denied, open '/__w/_temp/_runner_file_commands/...'Container runs as UID 1000 (via
ARG USER_UID=1000), but GitHub Actions mounts volumes owned by UID 1001, causing permission conflicts.Immediate Fix
Added
options: --user rootto container configuration in.github/workflows/ci.yml:Documented Proper Solution
Created three guides for fixing in container image:
CONTAINER_CHANGES_NEEDED.md- Quick reference: changeARG USER_UID=1001in DockerfileCONTAINER_SOLUTION.md- Four solution options with tradeoffsCONTAINER_FIX_GUIDE.md- Complete implementation guide with testing proceduresRecommended Container Changes
Change default UID in Dockerfile:
ARG USER_UID=1001 # Changed from 1000Bake in CI dependencies for 30-60s speedup:
RUN apt-get update && \ apt-get install -y libsqlite3-dev && \ ln -sf /usr/bin/ld.lld-22 /usr/bin/ld.lld && \ ln -sf /usr/bin/lld-22 /usr/bin/lld && \ ln -sf /usr/bin/clang-scan-deps-22 /usr/bin/clang-scan-deps && \ ln -sf /usr/bin/clang-format-22 /usr/bin/clang-format && \ mkdir -p /lib/share/libc++ && \ ln -sf /usr/lib/llvm-22/share/libc++/v1 /lib/share/libc++/v1 && \ apt-get clean && rm -rf /var/lib/apt/lists/*After container update: remove
options: --user rootand delete "Install dependencies" step.Alternative: Use
options: --user 1001:1001(safer than root, no container rebuild required).💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.