Docker-Compose too many levels of symlinks with NFS

我只是一个虾纸丫 提交于 2020-01-25 20:06:22

问题


I am trying to volume mount an nfs share but I am running into some issues with that. When I run a regular docker command such as:

docker run -i -t privileged=true -v /mnt/bluearc:/mnt/bluarc -v /net:/net ubuntu bash

I have my desired drive mounted at /mnt/bluearc. However, if I run it with docker-compose:

test_ser:
  container_name: test_ser
  hostname: test_ser
  image: ubuntu
  restart: always
  working_dir: /repo/drop_zone_dub
  volumes_from:
    - nerve_repo_data
  volumes:
    - /mnt/bluearc:/mnt/bluearc
    - /net:/net
  privileged: true
  command: bash

When I try to access the directories I get the following error:

Too many levels of symbolic links

What is compose doing differently that would cause this?


回答1:


I had the same issue and find a hidden docker parameter here:

https://github.com/moby/moby/issues/24303

-v /nfs:/nfs:shared

It works for me so far.




回答2:


I suspect this is related to Docker and Automounting. See https://serverfault.com/questions/640895/why-do-some-host-volumes-in-docker-containers-give-the-error-too-many-levels-of It seems to just be something Docker can't do.



来源:https://stackoverflow.com/questions/36697858/docker-compose-too-many-levels-of-symlinks-with-nfs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!