'Docker - Storing logs, files to host machine only
I am new to Docker.
I did read through the documentation.
Regarding 'volume' configuration, my understanding is data is stored with in the container as well as in host machine. I see the data is in sync with container and host. That is, if I delete some folders/files from host machine, they get immediately removed in container and vice versa.
Now as per my requirement, I need to upload huge number of files to Application running in container. If all these files get stored in container also along with in host machine, container may soon run out of space that is allocated.
In Docker file, I use Apache, tomcat, MongoDB and Solr. Earlier to Docker usage, I have a folder structure to store database files in Say 'Data' folder, files uploaded to 'Documents' and log files to 'logs'.
I want to establish same structure in host even with Docker.
Is there a way, where, I tell to Docker container to store 'files uploaded' or 'logs of my application' in Host only and not in Container?
Is it possible?
-- Harish
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
