Repository navigation
Engine: images list newest first, and a non-root container gets its missing working directory - #400
Closed
libracoder wants to merge 1 commit into
Closed
libracoder wants to merge 1 commit into
libracoder wants to merge 1 commit into
Conversation
…issing working directory
This was referenced Nov 16, 2026
Owner
Author
|
Replaced by #403, which also makes the missing working directory for |
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.
Summary
Two small Docker compatibility fixes in the engine:
docker imageslists the newest image first, as Docker does. Fixes Image list order differs from Docker Engine: older images appear first #364.Motivation
docker imagesas the newest got the wrong image.WorkingDir(mkdir -p), but only after it had switched to the container's user. A non-root user can't create directories under/, so the start failed withworking directory: No such file or directoryand exit code 127. DDEV'sddev-webserverhits this.Changes
crates/kiri/src/daemon/api.rs:images()sorts byCreated, newest first.crates/kiri-init/src/linux/container.rs: infinish_child(), for a non-root user, a missing working directory is created while the process is still root. It gets mode 0755 and stays owned by root, as Docker leaves it. Root containers keep the existing path.tests/e2e.sh: addsimages-newest-first,workdir-created-nonrootandworkdir-created-nonroot-mode.Behaviour changes
docker imagesandGET /images/jsonreturn images newest first. The window sorts its own list, so it looks the same.docker run -u 1000:1000 -w /missing/dir …now starts, inside/missing/dir, which is owned by root with mode 0755. Before, it exited 127.Testing
Both fixes were checked against main on all three systems, together with the open PRs for the same release (#392, #393, #372):
/made/for/1000with755 root. Fulltests/e2e.sh: no test fails on this branch that passes on main.tests/wsl.sh x86_64on the WSL 2 kernel): 21/21 pass on both main and the branch. The checks give the same results as on Linux.cargo test -p kiripasses.cargo clippyshows no new warnings on the host or the Linux target.Checklist
tests/e2e.sh)