Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#1,319 0 bình luận 2 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 5 ngày

@v-Mathiyarasy đang làm issue này rồi.

Từ ngày 7/4/2025.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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.

Ngôn ngữ chính
Shell
Star
1.5k
Fork
624
Merge trung bình
4 ngày 8 giờ
Pull request đã merge (30 ngày)
7

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của devcontainers/features

Tất cả issue của devcontainers/features

Issue tương tự

Thêm issue về Shell/Bash

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.