[Docker] 資料庫異常 刪除容器資料Volume

回覆文章
Lexaul
文章: 231
註冊時間: 2019-10-18, 14:28

[Docker] 資料庫異常 刪除容器資料Volume

文章 Lexaul » 2021-11-25, 11:09

https://stackoverflow.com/questions/597 ... es-on-init

If, when you start your Docker Compose, you're getting:

代碼: 選擇全部

PostgreSQL Database directory appears to contain a database; Skipping initialization
you need to proactively remove the volumes which were set up to store the database.

The command docker-compose down doesn't do this automatically.

You can request removal of volumes like this:

代碼: 選擇全部

docker-compose down --volumes
[email protected]
github.com/Lexaul

回覆文章