File exchange between container and host

I am launching a docker container with the volume / var / my _folder. The data is constant: when I close the container, it is still there. But I also want to have data on my host, because I want to work with code with an IDE that is not installed in my container.

So, how can I find the / var / my _folder folder on my main machine, which is also available in my container?

I am working on Linux Mint.

I appreciate your help.

Thank.:)

+2
source share
1 answer

Link: Data Management in Containers

The main launch command you want is ...

docker run -dt --name containerName -v /path/on/host:/path/in/container

The problem is that setting the volume will (for your purposes) overwrite the volume in the container

- ( ), .

ENTRYPOINT docker. , script THEN, .

, , , ENTRYPOINT script.

, ENTRYPOINT script.

+2

Source: https://habr.com/ru/post/1672639/


All Articles