Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rootless: update docs and examples #5765

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AkihiroSuda
Copy link
Member

@AkihiroSuda AkihiroSuda commented Feb 21, 2025

Fix #5763

  • Discourage --oci-worker-no-process-sandbox, due to the leakage of the processes (by design). Instead, encourage setting systempaths=unconfined in docker run. This corresponds to securityContext.procMount: Unmasked in Kubernetes, however, the configuration is hard on Kubernetes, as it has to be used in conjunction with hostUsers: false.

  • Remove --device /dev/fuse, as fuse-overlayfs is no longer used typically.

  • Use the new Kubernetes struct for AppArmor

  • Add a hint about kernel.apparmor_restrict_unprivileged_userns

  • Remove $ from command snippets for ease of copypasting

  • Make job.*.yaml more practical

  • Add *.userns.yaml. Needs UserNamespaceSupport feature gate to be enabled.


TODO: update buildx to support UserNS mode too

Fix issue 5763

- Discourage `--oci-worker-no-process-sandbox`, due to the leakage of
  the processes (by design).
  Instead, encourage setting `systempaths=unconfined` in `docker run`.
  This corresponds to `securityContext.procMount: Unmasked` in Kubernetes,
  however, the configuration is hard on Kubernetes, as it has to be used
  in conjunction with `hostUsers: false`.

- Remove `--device /dev/fuse`, as fuse-overlayfs is no longer used typically.

- Use the new Kubernetes struct for AppArmor

- Add a hint about `kernel.apparmor_restrict_unprivileged_userns`

- Remove `$` from command snippets for ease of copypasting

- Make `job.*.yaml` more practical

- Add `*.userns.yaml`. Needs `UserNamespaceSupport` feature gate to be enabled.

Signed-off-by: Akihiro Suda <[email protected]>
Copy link
Member

@tonistiigi tonistiigi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with the updates but isn't there a way to fix the specific process leak case if we have a reproducer? Even if we can't make it 100% guaranteed for other cases.

@AkihiroSuda
Copy link
Member Author

I'm ok with the updates but isn't there a way to fix the specific process leak case if we have a reproducer? Even if we can't make it 100% guaranteed for other cases.

Potentially we may use seccomp (or ptrace) to catch fork, clone, execve, etc. to track the leaked processes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

processes can remain active after build finishes with --oci-worker-no-process-sandbox
2 participants