You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The feature docker-in-docker fails to start the docker daemon with the error message
mount: /sys/kernel/security: permission denied.
dmesg(1) may have more information after failed mount system call.
Could not mount /sys/kernel/security.
AppArmor detection and --privileged mode might break.
when using a devcontainer with the Docker Desktop Hyper-V backend and having Enhanced Container Isolation enabled.
The container is started using --privileged however there are still some restrictions:
Containers become harder to breach. For example, sensitive system calls are vetted and portions of /proc and /sys are emulated inside the container.
This part of the code that checks for AppArmor stops the start, even though it would otherwise work perfectly fine.
if [ -d /sys/kernel/security ] &&! mountpoint -q /sys/kernel/security;then
mount -t securityfs none /sys/kernel/security || {
echo>&2'Could not mount /sys/kernel/security.'echo>&2'AppArmor detection and --privileged mode might break.'
}
fi
When building the container with ECI disabled and then running the built container with it enabled, everything works fine.
I would propose to either add a feature flag to disable the check or remove it altogether, however I am not too sure how many run into issues with running AppArmor inside a devcontainer base container.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
The feature docker-in-docker fails to start the docker daemon with the error message
when using a devcontainer with the Docker Desktop Hyper-V backend and having Enhanced Container Isolation enabled.
The container is started using --privileged however there are still some restrictions:
ECI
This part of the code that checks for AppArmor stops the start, even though it would otherwise work perfectly fine.
When building the container with ECI disabled and then running the built container with it enabled, everything works fine.
I would propose to either add a feature flag to disable the check or remove it altogether, however I am not too sure how many run into issues with running AppArmor inside a devcontainer base container.
The text was updated successfully, but these errors were encountered: