タグ: docker

  • MS-R1 で overlayFS が使えない

    MS-R1 で Docker を公式サイトの手順でインストールし、docker build すると、最後のステップでこのようなエラーになる。

     => ERROR exporting to image                                                                                                                                                      0.2s
     => => exporting layers                                                                                                                                                           0.2s
    ------
     > exporting to image:
    ------
    ERROR: failed to build: failed to solve: mount callback failed on /var/lib/containerd/tmpmounts/containerd-mount1483376101: mount callback failed on /var/lib/containerd/tmpmounts/containerd-mount2618877472: failed to write compressed diff: failed to create diff tar stream: failed to get xattr for /var/lib/containerd/tmpmounts/containerd-mount1483376101/bin: operation not supported

    ChatGPT くんによると

    Root cause: The custom kernel disabled ext4 security xattr support (CONFIG_EXT4_FS_SECURITY=n). Consequently, security.capability xattrs were unsupported, causing BuildKit/containerd to fail when exporting Docker image layers.

    解決策1: 必要な機能をつけて Kernel を再ビルドする (まだ試してない)

    解決策2: overlayFS を諦めて vfs に切り替える。以下を /etc/docker/daemon.json に記述し、docker.service を再起動。

    {
      "features": {
        "containerd-snapshotter": false
      },
      "storage-driver": "vfs"
    }

    vfs の正体については、以下を参照。

    https://docs.docker.com/engine/storage/drivers/vfs-driver