报错信息

Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:75: mounting "/data/docker-compose/augmented_reality_dev.sql" to rootfs at "/docker-entrypoint-initdb.d" caused: mount through procfd: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

在这里插入图片描述

解決
在docker-compose文件下创建init文件夹,然后将sql文件放进去,另外修改docker-compose的数据卷信息,如果所示,让目录映射目录
在这里插入图片描述

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐