You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.17 06:55:22