Reputation: 1227
I am learning Docker and for a start I am setting up a Postgres-db with docker-compose. It is actually working but I can not find, where the persistent data is stored on Windows by default. This is my .yml.
#docker-compose.yml
version: "3.6"
services:
mytestdb:
image: postgres:10
restart: always
container_name: mytestdb
environment:
POSTGRES_PASSWORD: mytestdb
ports:
- 5433:5432
volumes:
- mytestdb_persistent_testdata:/var/lib/postgresql/data
volumes:
mytestdb_persistent_testdata:
I was checking C://ProgramData/DockerDesktop as well as C://user/me/.docker. Are they named differently.
I'd appreciate a hint.
Upvotes: 0
Views: 803
Reputation: 12240
That's a bit depending on the setup of you docker installation. The common way was a separate virtual machine running your docker engine. The paths you see are paths inside that virtual machine and not directly accessible from windows (besides looking up the virtual machine disk image). If you are using the WSL2 mode, there is a way to access them easily from windows.
Please find all details in the answers to this other question, depending on how you are running your Docker for Windows.
Upvotes: 1