Fix CI Docker build on modern Ubuntu images#13
Draft
Copilot wants to merge 5 commits into
Draft
Conversation
- Remove the 'userdel ubuntu' step that caused package setup warnings on modern ubuntu:latest images - Replace failing 'localedef -A /usr/share/locale/locale.alias' with the Ubuntu-standard locale-gen approach - Add LC_ALL=en_US.UTF-8 environment variable for full locale support"
Copilot
AI
changed the title
[WIP] Fix CI failure in Docker image build
fix: Docker build failure on locale setup in CI pipeline
May 31, 2026
Copilot
AI
changed the title
fix: Docker build failure on locale setup in CI pipeline
Fix CI Docker build on modern Ubuntu images
May 31, 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.
Pull Request
Description
This PR addresses the CI Docker build failure on current
ubuntu:latestimages. The locale setup now uses the Ubuntu-supported path, and non-root user creation no longer assumes UID/GID1000is unused.Type of Change:
Changes
Explain what was changed and why:
Locale setup
localedef ... -A /usr/share/locale/locale.aliasinvocation with Ubuntu-native locale generation.User creation on modern base images
ubuntuuser.1000account when present, preserving the expectedcoderhome and shell.Dockerfile hardening
Testing
Test Coverage:
Test Results:
$ bats tests/unit/ 1..38 ok 1 script exists and is executable ... ok 38 profile uses Invoke-Expression for oh-my-posh init scriptManual Testing:
ubuntu:latest/home/coderandLANG=en_US.UTF-8in the resulting imageEnvironment:
Quality Checks
Documentation
Deployment
Rollback Plan:
Revert the Dockerfile user-setup and locale changes to restore the previous image behavior.
Screenshots
N/A
Checklist
Additional Notes
The latest PR workflow run is waiting in
action_required; once approved, it should exercise the exact Docker build path this change targets.Original prompt
Create a fix for the CI failure in jmcombs/powershell.
Context:
.github/workflows/ci.yml.Dockerfile, the build fails at the locale setup step:Observed error from logs:
Required solution:
locale-gen/update-locale) instead of the failinglocaledef ... -A /usr/share/locale/locale.aliasinvocation.userdel ubuntustep if it is unnecessary or harmful on modernubuntu:latestimages, since logs show package setup warnings about missing system users/groups after that deletion.Issue context:
[BUG] Docker build fails on locale setup in CI pipelinejmcombs/powershellPlease implement the fix, push the branch, and open the PR.
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.
Assistant: The failure is in the Docker build step of Build Test Image in
.github/workflows/ci.yml, where the workflow builds the image withdocker/build-push-action@v6(build-test-image, lines 101–109).Root cause
The actual build error is in
Dockerfile:RUN localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8The logs show:
So the image build fails because
localedefis using a path that does not exist in the currentubuntu:latestbase image.Best fix
Replace the locale generation step with the Ubuntu-supported
locale-genflow.Suggested Dockerfile change
Replace:
with:
Why this is the right solution
locale.aliasfile entirely.ubuntu:latestimage changes.Optional simpler alternative
If you want the smallest possible change, you can also try:
But
locale-genis the safer fix for Ubuntu.Additional issue worth correcting
There is also a risky user deletion step in
Dockerfilelines 28–33. The logs show multiple missing system users/groups after package installation, which is a sign that deleting the defaultubuntuuser onubuntu:latestis no longer safe.Current code:
Recommended change: remove this step entirely.
Recommended final patch