github.com/containerd/nerdctl@v1.7.7/docs/soci.md (about)

     1  # Lazy-pulling using SOCI Snapshotter
     2  
     3  SOCI Snapshotter is a containerd snapshotter plugin. It enables standard OCI images to be lazily loaded without requiring a build-time conversion step. "SOCI" is short for "Seekable OCI", and is pronounced "so-CHEE".
     4  
     5  See https://github.com/awslabs/soci-snapshotter to learn further information.
     6  
     7  ## Prerequisites
     8  
     9  - Install containerd remote snapshotter plugin (`soci-snapshotter-grpc`) from https://github.com/awslabs/soci-snapshotter/blob/main/docs/getting-started.md
    10  
    11  - Add the following to `/etc/containerd/config.toml`:
    12  ```toml
    13  [proxy_plugins]
    14    [proxy_plugins.soci]
    15      type = "snapshot"
    16      address = "/run/soci-snapshotter-grpc/soci-snapshotter-grpc.sock"
    17  ```
    18  
    19  - Launch `containerd` and `soci-snapshotter-grpc`
    20  
    21  ## Enable SOCI for `nerdctl run` and `nerdctl pull`
    22  
    23  | :zap: Requirement | nerdctl >= 1.5.0 |
    24  | ----------------- | ---------------- |
    25  
    26  - Run `nerdctl` with `--snapshotter=soci`
    27  ```console
    28  nerdctl run -it --rm --snapshotter=soci public.ecr.aws/soci-workshop-examples/ffmpeg:latest
    29  ```
    30  
    31  - You can also only pull the image with SOCI without running the container.
    32  ```console
    33  nerdctl pull --snapshotter=soci public.ecr.aws/soci-workshop-examples/ffmpeg:latest
    34  ```
    35  
    36  For images that already have SOCI indices, see https://gallery.ecr.aws/soci-workshop-examples
    37  
    38  ## Enable SOCI for `nerdctl push`
    39  
    40  | :zap: Requirement | nerdctl >= 1.6.0 |
    41  | ----------------- | ---------------- |
    42  
    43  - Push the image with SOCI index. Adding `--snapshotter=soci` arg to `nerdctl pull`, `nerdctl` will create the SOCI index and push the index to same destination as the image.
    44  ```console
    45  nerdctl push --snapshotter=soci --soci-span-size=2097152 --soci-min-layer-size=20971520 public.ecr.aws/my-registry/my-repo:latest
    46  ```
    47  --soci-span-size and --soci-min-layer-size are two properties to customize the SOCI index. See [Command Reference](https://github.com/containerd/nerdctl/blob/377b2077bb616194a8ef1e19ccde32aa1ffd6c84/docs/command-reference.md?plain=1#L773) for further details.