Currently i have web application which is running inside docker. This docker container(ContainerA) would dynamically create YAML files based on the input given from UI.
Now, ContainerA would start the containers in the YAML file.
For the shared connection between the host and ContainerA, i am using the following line in volumes.
- /var/run/docker.sock:/var/run/docker.sock
.
Now, i am able to run ContainerB(Assuming image in the YAML file). But the configuration files of ContainerB is present on Container A.
When i do a volume mount from ContainerA to ContainerB in YAML file. I get an empty directory.
How to volume mount files from one docker container(container A) into another container(Container B)?