Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement nerdctl run --annotation (introduced in Docker v24) #2906

Merged
merged 2 commits into from
Apr 3, 2024

Commits on Mar 31, 2024

  1. Implement nerdctl run --annotation (introduced in Docker v24)

    An OCI runtime (as well as `nerdctl internal oci-hook`) may consume an
    annotation and behave differently.
    e.g., https://github.com/opencontainers/runc/blob/v1.1.12/docs/systemd.md#auxiliary-properties
    
    nerdctl v1:
    - `nerdctl run --annotation` was not implemented.
    - `nerdctl run --label` is set as a containerd label and an OCI annotation.
    
    nerdctl v2:
    - `nerdctl run --annotation` is only set as an OCI annotation.
    - `nerdctl run --label` is only set as a containerd label.
      A label with the `nerdctl/` prefix can no longer be set manually,
      with an exception for `nerdctl/bypass4netns`.
      The `nerdctl/bypass4netns` label is still allowed and is propagated to
      an OCI annotation, for sake of compatibility.
    
    Docker v23:
    - `docker run --annotation` was not implemented.
    - `docker run --label` is only set as a Docker label.
    
    Docker v24 (implemented in docker/cli PR 4156, moby/moby PR 45025):
    - `docker run --annotation` is only set as an OCI annotation.
    - `docker run --label` is only set as a Docker label.
    
    (In a nutshell, `--annotation` may change the behavior, while `--label` should not.)
    
    Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
    AkihiroSuda committed Mar 31, 2024
    Configuration menu
    Copy the full SHA
    f42ab2f View commit details
    Browse the repository at this point in the history
  2. annotations: add nerdctl/bypass4netns-ignore-subnets ([]string)

    For experiments of additional `bypass4netns --ignore`
    
    Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
    AkihiroSuda committed Mar 31, 2024
    Configuration menu
    Copy the full SHA
    fc4c8e7 View commit details
    Browse the repository at this point in the history