Score:0

Creating a symlink for docker-volumes to another directory

cn flag

For reasons I need to symlink /var/lib/docker/volumes into /net/datadisc/disc1/docker_volumes, i.e. ever volume that docker creates inside /var/lib/docker/volumes would instead be created in /net/datadisc/disc1/docker_volumes

sudo ln -s /net/datadisc/disc1/docker_volumes /var/lib/docker/volumes doesn't do it.

Artur Meinild avatar
vn flag
The permissions in `/var/lib/docker` are very restrictive, so you need to do this as root (or with sudo). Also, I assume the permissions of the target directory should match those of `/var/lib/docker/volumes` (`drwx-----x` on my system).
Grumpy ol' Bear avatar
cn flag
Nevermind all that shite. I just started WinSCP, and created a symlink that way. Fuck that terminal confusing shite. I got the permission right at least...
Brijesh Sondarva avatar
ve flag
You could use the "--volume" option while creating the docker container and specify the required directory path which you want to use for data storage. i.e. : docker run -it -v <host/path>:<container/path> -d image_name
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.