fix(macos): normalize rootless Docker subordinate IDs
tracker-policy-pr / check-pr (pull_request) Successful in 8s
test / integration-docker (pull_request) Successful in 9s
test / unit (pull_request) Successful in 32s
lint / lint (push) Successful in 46s
test / stage-firecracker-inputs (pull_request) Successful in 2s
test / build-infra (pull_request) Successful in 3m23s
test / integration-firecracker (pull_request) Successful in 1m37s
test / coverage (pull_request) Failing after 1m24s
test / publish-infra (pull_request) Has been skipped

This commit is contained in:
2026-07-21 06:09:41 +00:00
parent 72e35a1343
commit 6c7b9c2f31
2 changed files with 6 additions and 2 deletions
@@ -42,8 +42,9 @@ def build_image(
" && apt-get install -y --no-install-recommends docker.io uidmap "
"rootlesskit slirp4netns fuse-overlayfs \\\n"
" && rm -rf /var/lib/apt/lists/* \\\n"
" && echo 'node:100000:65536' >> /etc/subuid \\\n"
" && echo 'node:100000:65536' >> /etc/subgid \\\n"
" && sed -i '/^node:/d' /etc/subuid /etc/subgid \\\n"
" && printf 'node:100000:65536\\n' >> /etc/subuid \\\n"
" && printf 'node:100000:65536\\n' >> /etc/subgid \\\n"
" && ln -s /usr/share/docker.io/contrib/dockerd-rootless.sh "
"/usr/local/bin/dockerd-rootless.sh\n"
"COPY rootless-docker-init.sh "
+3
View File
@@ -62,6 +62,9 @@ class TestRootlessDockerImage(unittest.TestCase):
text = Path(dockerfile).read_text(encoding="utf-8")
self.assertIn("FROM agent:base", text)
self.assertIn("docker.io uidmap rootlesskit slirp4netns", text)
self.assertIn("sed -i '/^node:/d' /etc/subuid /etc/subgid", text)
self.assertEqual(1, text.count("node:100000:65536\\n' >> /etc/subuid"))
self.assertEqual(1, text.count("node:100000:65536\\n' >> /etc/subgid"))
self.assertIn("USER node", text)
self.assertTrue((Path(context) / "rootless-docker-init.sh").is_file())