N
N
NkDev2018-06-12 12:49:47
Docker
NkDev, 2018-06-12 12:49:47

How to run a command from a docker container on a host?

a docker container is running on the host.
I went into it: docker exec -i -t centos bash
Now how can I send a command from this container to the host on which this container is running, for example: ls /home > /home/user/test. In the test file (on the host) I want to see the contents of the host's home folder.
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Pugachev, 2018-06-12
@NkDev

as if the essence of application dockerization is that it does not know about the host and does not have access to it,
you need to look towards volumes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question