Skip to content

OverlayBD Snapshotterを使用した遅延プル

⚡ 必要条件 nerdctl >= 0.15.0

OverlayBD is a remote container image format base on block-device which is an open-source implementation of paper "DADI: Block-Level Image Service for Agile and Elastic Application Deployment. USENIX ATC'20".

詳細については、https://github.com/containerd/accelerated-container-image を参照してください。

nerdctl実行の遅延プルを有効にする

  • https://github.com/containerd/accelerated-container-image/blob/main/docs/BUILDING.md から containerd リモート スナップショット プラグイン (overlaybd) をインストールします。

  • 以下を /etc/containerd/config.toml に追加します。

    [proxy_plugins]
      [proxy_plugins.overlaybd]
        type = "snapshot"
        address = "/run/overlaybd-snapshotter/overlaybd.sock"
    

  • containerdoverlaybd-snapshotter を起動します

  • nerdctl--snapshotter=overlaybdをつけて実行します

    nerdctl run --net host -it --rm --snapshotter=overlaybd registry.hub.docker.com/overlaybd/redis:6.2.1_obd
    

overlaybd イメージのビルド方法の詳細は、accelerated-container-image 変換ツールを参照してください。

nerdctl image convert を使用して OverlayBD イメージをビルドする

Nerdctlは、nerdctl image convertコマンドを使用して、OCIイメージまたはDocker形式のv2イメージをOverlayBDイメージに変換できます。

変換の前に、accelerated-container-image からビルドする overlaybd-snapshotter バイナリをインストールしておく必要があります。nerdctl image convert --overlaybd --oci <source_image> <target_image>のようにコマンドを実行して、<source_image>をタグが <target_image>のOverlayBDイメージに変換できます。