【发布时间】:2018-05-18 03:52:27
【问题描述】:
因此,自从 Docker v18.03 发布以来,我一直无法将卷挂载到 WSL 中的容器。以前我所要做的就是将我的/mnt/c 挂载到/c,即sudo mount --bind /mnt/c,然后运行docker run -t image_name:latest -v /c/Users/quantik/path/to/volume:/path/in/container,这样就可以了。但是,自从 18.03 发布以来,这似乎不再起作用。此外,除了this 建议创建一个指定驱动器安装位置的/etc/wsl.conf 文件之外,我找不到任何解决此更改的资源。然而,这似乎不起作用。我想知道是否有其他人遇到过这个问题?
我收到以下错误消息:
ERROR: for frontend Cannot start service frontend: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \"rootfs_linux.go:58: mounting \\\"/c/Users/quantik/app/nginx.conf\\\" to rootfs \\\"/var/lib/docker/overlay2/8f0733bfec60fc92405b829f5f68463ffe4e94e678651b6ab34f18b24e66a713/merged\\\" at \\\"/var/lib/docker/overlay2/8f0733bfec60fc92405b829f5f68463ffe4e94e678651b6ab34f18b24e66a713/merged/etc/nginx/nginx.conf\\\" caused \\\"not a directory\\\"\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type ERROR: Encountered errors while bringing up the project.
【问题讨论】:
标签: ubuntu docker windows-subsystem-for-linux