Template:Ubuntu24 Docker: Difference between revisions

From Variscite Wiki
(Created page with "<includeonly> For Ubuntu 24.04: 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 to build the image. Disable this restriction on the entire system for one boot: <pre> echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns </pre> Di...")
 
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<includeonly>
For Ubuntu 24.04:
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.
 
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 to build the image.


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>


Disable this restriction using a persistent setting by adding a new file (/etc/sysctl.d/60-apparmor-namespace.conf) with the following contents:
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>
# /etc/sysctl.d/60-apparmor-namespace.conf
$ echo 'kernel.apparmor_restrict_unprivileged_userns=0' | sudo tee /etc/sysctl.d/60-apparmor-namespace.conf
kernel.apparmor_restrict_unprivileged_userns=0
$ sudo sysctl -p /etc/sysctl.d/60-apparmor-namespace.conf
</pre>
</pre>
</includeonly>
</includeonly>

Latest revision as of 15:07, 19 November 2024