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

Fix: allow directories for --device and in-container path (fix #2985) #2986

Merged
merged 1 commit into from May 13, 2024

Conversation

apostasie
Copy link
Contributor

@apostasie apostasie commented May 11, 2024

Fix #2985

Patch is much simpler than I thought, as containerd provides ready-made helpers for that.

Incidentally, this patch also allows for in-container path for devices.

Local testing:

apo@oliphant:~ $ sudo ./nerdctl run -ti --device /dev/snd:/somethingelse debian ls -lA /somethingelse
total 0
crw-rw---- 1 root audio 116,  3 May 11 05:09 controlC0
crw-rw---- 1 root audio 116,  5 May 11 05:09 controlC1
crw-rw---- 1 root audio 116,  2 May 11 05:09 pcmC0D0p
crw-rw---- 1 root audio 116,  4 May 11 05:09 pcmC1D0p
crw-rw---- 1 root audio 116,  1 May 11 05:09 seq
crw-rw---- 1 root audio 116, 33 May 11 05:09 timer

Signed-off-by: apostasie <spam_blackhole@farcloser.world>
@apostasie
Copy link
Contributor Author

apostasie commented May 11, 2024

@AkihiroSuda can you take a look?

Thanks.

@AkihiroSuda AkihiroSuda added this to the v2.0.0 milestone May 11, 2024
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AkihiroSuda AkihiroSuda merged commit 35f22c7 into containerd:main May 13, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot pass folder to --device
2 participants