I am having trouble mounting the PostgreSQL server directory created by Docker on the host.
Docker is trying to create a database container using PostgreSQL.
to perpetuate data using the postgres formula image
Attempt to mount /var/lib/postgresql/data to the vol directory on the host and run it,
I ran the following command, but the container did not start.
Command executed
$docker run-d-p 5432:5432-v`pwd`/vol:/var/lib/postgresql/data postgres: 9.6.2
- -v option was not specified to boot.
Other sites said it could be mounted this way, but is there anything you can think of that might be the reason why the container won't start?
The environment is as follows:
I don't know much about it, so I'm sorry if it's a common sense question.
Thank you for your cooperation.
VirtualBox does not use docker, but isn't `pwd`
unnecessary?
`pwd`/vol
is the absolute path.
© 2024 OneMinuteCode. All rights reserved.