Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[docker-in-docker] Not working with Docker Desktop and Enhanced Container Isolation

オープン
#1,319 コメント 0 件 リアクション 2 件 担当者 1 名 GitHub で見る

メンテナーはふだん 5 日以内に返信

@v-Mathiyarasy がすでに取り組んでいます。

2025年4月7日 から。

評価

この issue はまだ評価されていません。

説明

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:

ECI

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.

主要言語
Shell
スター
1.5k
フォーク
624
平均マージ
4日 8時間
マージ済み PR(30日)
7

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

devcontainers/features のほかの issue

devcontainers/features の issue をすべて見る

似ている issue

Shell/Bash の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。