containerd / containerd/nerdctl

Nested volume mounting behaviour is not compatible with Docker

Open
#2,254 4 comments 1 reaction 0 assignees View on GitHub
bug priority/low
Dominant language
Go
Stars
10.4k
Forks
826
Avg merge
1d 23h
Merged PRs (30d)
44

Description

### Description

There appears to be a behavior mismatch between nerdctl and Docker in the handling of nested volume mounts. In Docker, a nested volume within another volume is correctly accessible, while in nerdctl, the same nested volume fails to be accessible and returns an error "No such file or directory".

### Steps to reproduce the issue

```
./_output/nerdctl run --rm -it -v /home/ubuntu/nerdctl/test-1/test-2:/home/ubuntu/nerdctl/test-1/test-2 -v /home/ubuntu/nerdctl/test-empty:/home/ubuntu/nerdctl/test-1 public.ecr.aws/amazonlinux/amazonlinux:2 bash
```

In bash,
```
ls /home/ubuntu/nerdctl/test-1/test-2
```

### Describe the results you received and expected

The 'ls' command results in the following error:
```
ls: cannot access /home/ubuntu/nerdctl/test-1/test-2: No such file or directory
```

In Docker, it can return the correct content under `test-2`. The compatibility with docker is expected.

### What version of nerdctl are you using?

Built from latest main branch.

### Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

### Host information

```
Admin:~/nerdctl (main) $ sudo nerdctl info
Client:
Namespace: default
Debug Mode: false

Server:
Server Version: 1.6.16
Storage Driver: overlayfs
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Log: fluentd journald json-file syslog
Storage: aufs native overlayfs
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 5.4.0-1101-aws
Operating System: Ubuntu 18.04.6 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 7.565GiB
Name: ip-172-31-84-158
ID: 81a4bd4f-3517-4214-a219-c720373f9d8b

WARNING: No swap limit support
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.