Score:0

Copying files from docker container to Ubuntu virtual box

in flag

I am trying to copy files from my docker container to Ubuntu 20.04 running in virtual box. I tried with docker cp command as:

docker cp images/rootfs.ext4 :./Projects

But this doesn't work. 'Projects' directory is in the virual box and 'images/rootfs.ext4' is part of docker container. Is there any way to copy files from container to virtual machine?

I am using Windows machine as host machine and both docker and virtual box are using same windows as host machine.

How can we setup a shared directory on the host to copy files?

Your help will be much appreciated! Thank you.

in flag
There are a lot of different ways to do this. If both the Docker container and the VM are running on the same host, a shared directory on the host is typically the simplest. However, this will depend on what OS your host is running, what sort of data policies you have to comply with, as well as how the publishing and consuming services work with file locks …
Sourabh_Hegde avatar
in flag
Hi matigo, Thanks for your suggestion, I have updated my question. I am using Windows machine as host machine and both docker and virtual box are using same windows as host machine. Can you please let me know how to setup shared directory?
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.