Skip to content

fix(docker): chown devbox binary with sudo in DevboxImageDockerfile - #3052

Merged
mikeland73 merged 1 commit into
mainfrom
fix-docker-image-chown
Nov 13, 2026
Merged

mikeland73 merged 1 commit into
mainfrom
fix-docker-image-chown

Conversation

@mikeland73

Copy link
Copy Markdown
Collaborator

docker-image-release failed for 0.21.0 (run):

#20 [linux/amd64 12/13] RUN chown -R "devbox:devbox" /usr/local/bin/devbox
chown: changing ownership of '/usr/local/bin/devbox': Operation not permitted

Cause

#3048 switched the image from get.jetify.com/devbox to the repo's install.sh. The old script ran sudo mv on a temp file the devbox user owned, so the installed binary stayed owned by devbox, and the unprivileged chown after it was a no-op. The new script runs sudo cp and mv, so the binary is owned by root, and the chown (running as USER devbox) fails.

Fix

Run that chown with sudo. The devbox user already has passwordless sudo, set up earlier in the same Dockerfile. DevboxImageDockerfileRootUser runs as root and has no chown, so it isn't affected.

Testing

Docker isn't available on the machine this was prepared on, so I haven't built the image locally. After this merges, I'll re-run docker-image-release via workflow_dispatch with tag=0.21.0. That run checks out main, and the build itself will check the fix.

🤖 Generated with Claude Code

The GitHub install.sh copies the binary into /usr/local/bin with sudo,
so it ends up owned by root. The old get.jetify.com script moved a
user-owned temp file into place, which kept the devbox user as owner,
so the unprivileged chown that follows used to be a no-op. Now it fails
with "Operation not permitted", which broke docker-image-release for
0.21.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claude

claude Bot commented Nov 13, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The change appears safe to merge and addresses the reported ownership failure.

Summary

Adds sudo to the existing ownership change so the devbox user can take ownership of the root-owned binary.

  • The non-root Devbox image assigns its binary to the devbox user.

Reviews (1) · Last reviewed commit: "fix(docker): chown devbox binary with su..." · Reviewed by Greptile

@mikeland73
mikeland73 merged commit 831165b into main Nov 13, 2026
31 checks passed
@mikeland73
mikeland73 deleted the fix-docker-image-chown branch November 13, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant