Docker Community Forums

Share and learn in the Docker community.

How to share part of a volume created with docker volume


(Fabian) #1

Hi!

Is there a way to share a subfolder of a volume created with docker volume ?

for example:
I have a “my-vol” volume created with:

$ docker volume create my-vol

Inside my-vol I have a folder folder1.

I need to create a container with the volume my-vol/folder1 with target /baseFolder

like: $ docker run --rm -i -v=my-vol/folder1:/baseFolder busybox

but this doesn’t work.
Thank you