K
K
krll-k2017-05-22 17:55:32
Docker
krll-k, 2017-05-22 17:55:32

When starting the docker container, I forgot to set the volume, how to fix the assumption in running mode?

I started the container with the docker run command. But apart from the --net=host and --restart=always parameter, it did nothing. Now the files I need are accumulating in the container, and I'm scratching my head on how to configure the export of files from the container to the host machine The
images?q=tbn:ANd9GcQ764bO70guvKtxqP-6L_D
question is twofold, I'm interested in two senses:
1) you need your solution, and it's better the one you use yourself, and it's personally verified by you ;
2) and what can be done in theory, because in addition to the network parameters, restart and mount, there are many parameters.
PS At the stage of launching a container, you do not always know what you need in a month or a year, and what to do?
How to deal with docker, are there any gurus on this subject? I look forward to your detailed response.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Shvets, 2017-05-23
@krll-k

A container is not some kind of forever running entity that you need to work with.
Containers should be killed and created without affecting user data (for example, when updating software).
In your case, you copy the "files you need" to a folder on the host system using docker cp, delete the container and start it with volume in this folder.

K
krll-k, 2017-05-22
@krll-k

https://ivan.bessarabov.ru/blog/docker-volumes-exp...
The documentation says that there are 2 things:

  • Data volumes
    https://blog.amartynov.ru/docker-named-volumes/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question