符号链接主机到Docker容器 [英] Symbolic Link Host to Docker Container
问题描述
< /root/.m2 myContainerAlias
我看过以下帖子,但他们没有帮助我,因为我不想将文件复制到我的本地主机。 / p>
https://omarabid.com/symlink-to-a-mounted-volume-in-docker/
已编辑:
我在这里发现了另一个有价值的问题:
有关这个问题的进一步调查。我想通知,在以下帖子中,我已经以@Kai Hofstetter的方式解决了我的问题:如何将docker容器中的目录装载到主机?
Well, Basically I wanna create a Symbolic link "ln -s" from my host to my container.
To sum up: the host folder .m2 of the host must have a Symbolic link to the .m2 folder inside my container, something like: $ ln -s containerIp:/root/.m2 myContainerAlias
I've seen the below posts but they didn't help me since I don't wanna copy the files to my local host.
Docker - copy file from container to host
Apache in Docker says: Symbolic link not allowed
https://omarabid.com/symlink-to-a-mounted-volume-in-docker/
Edited:
I've found another valuable Issue here:
How to mount a directory in the docker container to the host? Thanks...
For further investigation about this question. I would like to notify that I've "solved" my issue with the same approach than @Kai Hofstetter in the following post: How to mount a directory in the docker container to the host?
这篇关于符号链接主机到Docker容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!