I ran docker system prune
, forgetting about a particular Postgres database whose contents I still wanted.
I think I probably still have the volume in macOS's Docker virtual machine. However, I have no idea which it is, they all look like:
✗ docker volume ls
DRIVER VOLUME NAME
local 0bb96275a994e1eacafe016547a194d8f91580eb2b42e47897f4c90b48f7f92a
local 1a5adc7281788533e612b8c11cede2847aaf3f9819678322950ba4c199711481
local 1a6f07dd7a704731d0ad42e57a95d6ea136951c47de6e28aa3d2b8d8d891bf4f
local 2ad31cdc84c0e606e4535b1e22c9826fdf7cf21772cdb3c1604179aea6f861ff
[70 more volumes not listed]
My questions: How can I launch a Docker container from the postgres:9.6-alpine
image I was using for the application, and have it use one of those volumes to check if it's the one I am looking for?
The database container was previously created by docker-compose
. If I can launch the whole application with docker-compose
and have the database use a particular volume, I can quite quickly discover if it's the right one.