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
nerdctl container inspect can't show Mounts of container which is created by CRI or ctr #2934
Labels
Comments
SGTM |
zjumoon01
pushed a commit
to zjumoon01/nerdctl
that referenced
this issue
Apr 15, 2024
Fix containerd#2934 Containers created by CRI or ctr with bind mounts don't have label "nerdct/mounts". However, 'inspect' with dockercompat mode only parses mounts from label "nerdct/mounts". After this patch, 'inspect' with dockercompat mode can show CRI and ctr container bind mounts. ResolvConfPath, HostnamePath and Hostname are taken to the same consideration. Signed-off-by: baijia <baijia.wr@antgroup.com>
zjumoon01
pushed a commit
to zjumoon01/nerdctl
that referenced
this issue
Apr 25, 2024
Fix containerd#2934 Containers created by CRI or ctr with bind mounts don't have label "nerdct/mounts". However, 'inspect' with dockercompat mode only parses mounts from label "nerdct/mounts". After this patch, 'inspect' with dockercompat mode can show CRI and ctr container bind mounts. ResolvConfPath, HostnamePath and Hostname are taken to the same consideration. Signed-off-by: baijia <baijia.wr@antgroup.com>
zjumoon01
pushed a commit
to zjumoon01/nerdctl
that referenced
this issue
Apr 26, 2024
Fix containerd#2934 Containers created by CRI or ctr with bind mounts don't have label "nerdct/mounts". However, 'inspect' with dockercompat mode only parses mounts from label "nerdct/mounts". After this patch, 'inspect' with dockercompat mode can show CRI and ctr container bind mounts. ResolvConfPath, HostnamePath and Hostname are taken to the same consideration. Signed-off-by: baijia <baijia.wr@antgroup.com>
zjumoon01
pushed a commit
to zjumoon01/nerdctl
that referenced
this issue
Apr 26, 2024
Fix containerd#2934 Containers created by CRI or ctr with bind mounts don't have label "nerdct/mounts". However, 'inspect' with dockercompat mode only parses mounts from label "nerdct/mounts". After this patch, 'inspect' with dockercompat mode can show CRI and ctr container bind mounts. ResolvConfPath, HostnamePath and Hostname are taken to the same consideration. Signed-off-by: baijia <baijia.wr@antgroup.com>
zjumoon01
pushed a commit
to zjumoon01/nerdctl
that referenced
this issue
May 6, 2024
Fix containerd#2934 Containers created by CRI or ctr with bind mounts don't have label "nerdct/mounts". However, 'inspect' with dockercompat mode only parses mounts from label "nerdct/mounts". After this patch, 'inspect' with dockercompat mode can show CRI and ctr container bind mounts. ResolvConfPath, HostnamePath and Hostname are taken to the same consideration. Signed-off-by: baijia <baijia.wr@antgroup.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is the problem you're trying to solve
Containers are created by CRI or ctr with bind mounts.
nerdctl inspect <container>
shows Mounts is null.However,
nerdctl inspect --mode native 0298a4
can show bind mounts which are actually in container OCI spec.https://github.com/containerd/nerdctl/blob/main/pkg/inspecttypes/dockercompat/dockercompat.go#L251
It only shows mounts from label
nerdctl/mounts
.In other words,
nerdctl inspect
only shows mounts of containers which are created by itself.Describe the solution you'd like
I'm not sure the result is by design or we can do some improvements.
My proposal:
Additional context
No response
The text was updated successfully, but these errors were encountered: