Search code examples
windowsdockerkitematic

Where exactly, are files in docker container stored on the host machine


I am using docker on windows. With the use of kitematic, I have created an ubuntu container. This ubuntu image has postgresql installed on it.

Wondering if there is any possibility to access the postgres configuration files available in the container from the host (windows machine)?
Where exactly does the container store its file system on the host machine?
I hope it would be part of image file with format VMDK.
Please correct me if I'm wrong.


Solution

  • Wondering if there is any possibility to access the postgres configuration files available in the container from the host (windows machine)

    That is not how Docker would allow you to modify a file in a container.
    For that, you should mount a host (Windows) folder when starting (docker run -v) your container.
    See "Mount a host directory as a data volume"

    docker run -d -P --name web -v /c/Users/<myACcount>/src/webapp:/opt/webapp training/webapp python app.py
    

    Issue 247 mentions ~/Library/Application Support/Kitematic for App data, and ~/Kitematic "for easy access to volume data".