Template:Ubuntu24 Docker: Difference between revisions
From Variscite Wiki
No edit summary |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
Ubuntu 24.04 introduced additional [https://discourse.ubuntu.com/t/ubuntu-24-04-lts-noble-numbat-release-notes/39890#p-99950-unprivileged-user-namespace-restrictions unprivileged user namespace restrictions]. They must be disabled when using Variscite's docker container | Ubuntu 24.04 introduced additional [https://discourse.ubuntu.com/t/ubuntu-24-04-lts-noble-numbat-release-notes/39890#p-99950-unprivileged-user-namespace-restrictions unprivileged user namespace restrictions]. They must be disabled to avoid permission errors during Yocto fetch tasks when using Variscite's docker container. | ||
Disable this restriction on the entire system for one boot: | Disable this restriction on the entire system for one boot: | ||
<pre> | <pre> | ||
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns | $ echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns | ||
</pre> | </pre> | ||
Alternatively, disable this restriction using a persistent setting by adding a new file (/etc/sysctl.d/60-apparmor-namespace.conf) with the following contents: | |||
<pre> | <pre> | ||
$ echo 'kernel.apparmor_restrict_unprivileged_userns=0' | sudo tee /etc/sysctl.d/60-apparmor-namespace.conf | |||
$ sudo sysctl -p /etc/sysctl.d/60-apparmor-namespace.conf | |||
</pre> | </pre> | ||
</includeonly> | </includeonly> |