File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,6 +43,10 @@ Platform notes:
4343- ** Linux** builds need only Docker: ` pnpm build:linux ` compiles inside
4444 ` swift:6.1-bookworm ` and emits a tarball. Chromium must be non-Snap —
4545 the runtime rejects Snap launchers before starting, by design.
46+ - ** Rootless Docker works** , including the E2E: Chromium's nested namespace
47+ sandbox runs fine, and the harness detects the daemon mode so exported QA
48+ evidence comes back owned by you. Nothing binds a host port, so the suites
49+ cannot collide with other services on a shared machine.
4650- ` pnpm test:e2e:mac ` opens real windows and mutates ` com.headless.app ` user
4751 defaults. Don't run it in a background session or on a machine where that
4852 matters.
Original file line number Diff line number Diff line change @@ -8,9 +8,19 @@ EVIDENCE_ROOT="${HEADLESS_EVIDENCE_ROOT:-$PWD/build/qa-evidence}"
88mkdir -p " $EVIDENCE_ROOT "
99EVIDENCE_DIR=" $( mktemp -d " $EVIDENCE_ROOT /linux.XXXXXX" ) "
1010chmod 0777 " $EVIDENCE_DIR "
11+ # The container writes evidence as its own non-root user, which lands on the
12+ # host as an id this user cannot read. Which id to hand it back to depends on
13+ # how the daemon maps them: rootful Docker maps uid to uid, so the invoking
14+ # user's id is correct, while rootless maps container root to the invoking user
15+ # and every other container id to an unreadable subuid.
16+ if docker info --format ' {{join .SecurityOptions ","}}' 2> /dev/null | grep -q rootless; then
17+ EVIDENCE_OWNER=" 0:0"
18+ else
19+ EVIDENCE_OWNER=" $( id -u) :$( id -g) "
20+ fi
1121restore_evidence_owner () {
1222 docker run --rm --user root -v " $EVIDENCE_DIR :/evidence" \
13- headless-p1-test chown -R " $( id -u ) : $( id -g ) " /evidence > /dev/null 2>&1 || true
23+ headless-p1-test chown -R " $EVIDENCE_OWNER " /evidence > /dev/null 2>&1 || true
1424 chmod 0700 " $EVIDENCE_DIR " > /dev/null 2>&1 || true
1525}
1626file_mode () {
You can’t perform that action at this time.
0 commit comments