-
Notifications
You must be signed in to change notification settings - Fork 574
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
Bind mount throws error if the directory does not exit beforehand #1652
Comments
AFAICT bind mounts simply do not work with |
Maybe there are discrepencies in different distribution? I can use bind mount on windows using the nerdctl shipped with RancherDesktop. |
Something similar happens if you try to mount a file into a folder that exists but is itself about to be mounted. On macOS:
|
Description
Discussed in rancher-sandbox/rancher-desktop#3603
Hello
I am running
nerdctl
on windows, using rancher desktop version 1.6.2.I have a simple compose file with directory mounts, nothing fancy just a mysql container.
But
nerdctl compose up
fails if I run without the mount directory manually first. The output I get with--debug
option is as followI can run the compose file if I change my container engine to
Dockerd/moby
and usedocker compose up
.If I remove the volume binds I can run the compose file with
nerdctl compose up
.nerdctl compose
andnerdctl run -v
S\should make empty mount directories if those do not already exist likedocker compose
anddocker run -v
in windows.Steps to reproduce the issue
nerdctl run -v mysql_db_data:/var/lib/mysql mysql:8.0.30
without creaating themysql_db_data
directory in the host.Or
nerdctl compose up
with follwing compose file.Describe the results you received and expected
Recieved
nerdctl run -v mysql_db_data:/var/lib/mysql mysql:8.0.30
fails with following errornerdctl compose up
fails with following error.Expected
nerdctl to create the bind mount directory if it does not already exist and container properly starts without any error.
What version of nerdctl are you using?
Client:
Version: v0.23.0
OS/Arch: linux/amd64
Git commit: 660680b
buildctl:
Version: v0.10.4
GitCommit: a2ba6869363812a210fcc3ded6926757ab780b5f
Server:
containerd:
Version: v1.6.8
GitCommit: 9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
runc:
Version: 1.1.4
GitCommit: 5fd4c4d144137e991c4acebb2146ab1483a97925
Are you using a variant of nerdctl? (e.g., Rancher Desktop)
Rancher Desktop for Windows
Host information
Client:
Namespace: default
Debug Mode: false
Server:
Server Version: v1.6.8
Storage Driver: overlayfs
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Log: fluentd journald json-file
Storage: native overlayfs
Security Options:
seccomp
Profile: default
Kernel Version: 5.10.16.3-microsoft-standard-WSL2
Operating System: Rancher Desktop WSL Distribution
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 12.24GiB
Name: 11-11569698
ID: 8e7f6d3b-981b-48f3-81ac-40260dd40697
The text was updated successfully, but these errors were encountered: