Repository navigation
fix(atp): make the mounted data set writable in the test container - #103
Merged
Merged
Conversation
Collaborator
|
PR #103 makes the acceptance-test container use the host user’s UID so the app can create, rename, and delete files in the mounted dataset on Linux. Must fix
Verdict Hold the merge. I verified the shipped ZIP and checked the build arguments with a stubbed Docker command. The end-to-end container run remains unverified. |
- Regenerate the tester ZIP so it carries the new Dockerfile and scripts. - build.sh uses the invoking user's UID under sudo (SUDO_UID) and stops before Docker if the UID is still 0. - run.sh publishes noVNC on 127.0.0.1 only: it has no password and the data set is writable. - useradd -l, so a large host UID (Git Bash) does not bloat the image. - build.sh and run.sh are executable again.
Collaborator
|
build.sh compared the UID as a string, so TESTER_UID=0000 reached Docker and failed only at useradd, after the package downloads. It now accepts only a decimal number, strips leading zeros, rejects root and values above 4294967294, and regenerates the tester ZIP.
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 and why
On Linux, the ATP scenarios that create, rename or delete files fail: the app inside the
container cannot write to the mounted data set.
ubuntu:24.04already ships aubuntuuser with UID 1000, souseradd testergot UID1001. The data set mounted from the host belongs to the host user (UID 1000 on most Linux
machines) with owner-only write access, so
testercould read it but not change it.Docker Desktop on macOS remaps file owners, which hid the problem there.
Dockerfile: removes theubuntuuser and createstesterwith the UID given by thenew
TESTER_UIDbuild argument (default 1000).build.sh: passes the host user's UID (id -u).How it was checked
On WSL2 (Ubuntu), host UID 1000:
docker exec coretrace-gui-atp idshoweduid=1001(tester), and creating afile from the app in
/home/tester/workspacefailed with a permission error;./build.shand./run.sh:uid=1000(tester), and the scenarios that create,rename and delete files pass.
macOS is not affected:
id -ugives 501 there, and Docker Desktop maps file owners anyway.