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

imageverifier plugin CLI Arguments format issue #10114

Open
arronwy opened this issue Apr 23, 2024 · 6 comments
Open

imageverifier plugin CLI Arguments format issue #10114

arronwy opened this issue Apr 23, 2024 · 6 comments
Labels

Comments

@arronwy
Copy link

arronwy commented Apr 23, 2024

Description

https://github.com/containerd/containerd/blob/main/docs/image-verification.md#cli-arguments

https://github.com/containerd/containerd/blob/main/pkg/imageverifier/bindir/bindir.go#L118-L121

normally the command line should support short or long two types flags:

-n: The given reference to the image that may be pulled.
-d: The resolved digest of the image that may be pulled.
-s: The media type of the JSON data passed to stdin.

--name: The given reference to the image that may be pulled.
--digest: The resolved digest of the image that may be pulled.
--stdin-media-type: The media type of the JSON data passed to stdin.

But current CLI Arguments use single-dash arguments with longer names, it may not suitable as binary API

Steps to reproduce the issue

Describe the results you received and expected

--name: The given reference to the image that may be pulled.
--digest: The resolved digest of the image that may be pulled.
--stdin-media-type: The media type of the JSON data passed to stdin.

What version of containerd are you using?

latest main branch

Any other relevant information

No response

Show configuration if it is related to CRI plugin.

No response

@Anish-M
Copy link

Anish-M commented Apr 24, 2024

Hi, I'd like to take on this issue if possible.

@arronwy
Copy link
Author

arronwy commented Apr 24, 2024

Hi, I'd like to take on this issue if possible.

@Anish-M sure, Thanks a lot!

@Anish-M
Copy link

Anish-M commented Apr 26, 2024

@arronwy I have some local containerd code I'm trying to test out, how do I run the default image-verifier plugin? Also I launched the build env with codespaces by I don't see any /opt/containerd/config.toml though I do believe that the image-verifier plugin is already setup correctly

@arronwy
Copy link
Author

arronwy commented Apr 28, 2024

Hi @Anish-M , we can build the containerd from main branch:

containerd --version
containerd github.com/containerd/containerd v2.0.0-rc.0-71-g831795901.m 8317959018015f6a1756ec8cd08be1093fd630a2.m

Check whether containerd image-verifier plugin status:

 ctr plugin ls
TYPE                                   ID                       PLATFORMS      STATUS
io.containerd.image-verifier.v1        bindir                   -              ok

Check contianerd default config:

containerd config default

  [plugins.'io.containerd.image-verifier.v1.bindir']
    bin_dir = '/opt/containerd/image-verifier/bin'
    max_verifiers = 10
    per_verifier_timeout = '10s'

The image-verifier binary should under directory: /opt/containerd/image-verifier/bin

@Anish-M
Copy link

Anish-M commented Apr 28, 2024

I don't see any image-verifier directory at that location, how can I build or compile the image-verifier plugin to get the binary there?

@dmcgowan
Copy link
Member

dmcgowan commented May 1, 2024

But current CLI Arguments use single-dash arguments with longer names, it may not suitable as binary API

@arronwy Can you give more detail why it may not be suitable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants