0

I have started a docker image using command

docker run -p 5433:5433 -p 5444:5444 \
           --mount type=volume,source=vertica-data,target=/data \
           --name vertica_ce \
           vertica/vertica-ce

I believe source=vertica-data is the local mount point for docker images's /data directory. But I can't fid this directory on my windows laptop. Where does docker create vertica-data directory?

Manu Chadha
  • 15,555
  • 19
  • 91
  • 184
  • Usually if you're using Docker named volumes, you shouldn't expect to directly access the files in the volume. Use a bind-mount instead; `docker run -v $PWD/vertica-data:/data`. – David Maze Dec 01 '21 at 19:10

1 Answers1

0

This command creates a named volume. You can list these volumes using docker volume ls. docker volume inspect vertica-data will show you the path where the data is actually stored.

Apart from named volumes, you may also use bind mounts, which means mounting a directory on the host inside of the container. This can be done using --mount type=bind,source=/path/on/host,target=/data

For more information, please refer to the documentation how to use volumes

jalr
  • 118
  • 3