Windows环境下Docker挂载卷失败:PostgreSQL启动报错求助
Docker运行PostgreSQL挂载Windows本地目录报错:The system cannot find the file specified
我在Windows终端执行以下命令尝试用Docker启动PostgreSQL容器:
winpty docker run -it \ -e POSTGRES_USER="root" \ -e POSTGRES_PASSWORD="root" \ -e POSTGRES_DB="ny_taxi" \ -v C:\Users\SomeUser\OneDrive\Documents\ny_taxi_postgres_data:/var/lib/postgresql/data \ -p 5432:5432 \ postgres:13
但一直收到报错:Error response from daemon: The system cannot find the file specified
我已经试过重启Docker Desktop、重装Docker、更新到最新版本这些常见方案,都没解决问题。
移除-v挂载参数后,容器能正常启动,但我需要持久化存储数据,所以无挂载的方式不是长期解决方案。
有没有人遇到过类似的问题?怎么解决?
内容的提问来源于stack exchange,提问作者Nate
相关产品推荐
相关产品推荐

