问题
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