symlink - Symbolic Link Host to Docker Container -
well, wanna create symbolic link "ln -s" host container.
to sum up: host folder .m2 of host must have symbolic link .m2 folder inside container, like: $ ln -s containerip:/root/.m2 mycontaineralias
i've seen below posts didn't me since don't wanna copy files local host.
docker - copy file container host
apache in docker says: symbolic link not allowed
https://omarabid.com/symlink-to-a-mounted-volume-in-docker/
edited:
i've found valuable issue here:
if want share data between host , container, or visa versa, need use docker volume.
there many ways this, situation easiest mount host directory data volume. done -v
flag docker. example docker run -it -v /path/to/.m2:/root/.m2 ubuntu:latest /bin/bash
run ubuntu:latest
image host directory /path/to/.m2
'symlinked' container directory /root/.m2
.
hope helps.
Comments
Post a Comment