ERROR: for mysql Cannot start service mysql: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"rootfs_linux.go:58: mounting \\\"/host_mnt/Users/***/go/src/path/docker/mysql/tmp.sql\\\" to rootfs \\\"/var/lib/docker/overlay2/86653e39e29580148822b099e25384286dc0239469e7e82d725ec9b031720a87/merged\\\" at \\\"/opt/tmp.sql\\\" caused \\\"stat /host_mnt/Users/***/go/src/path/docker/mysql/tmp.sql: 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 desktop 的 General下的Use gRPC FUSE for file sharing 以及 Enable experimental features,问题就消失了。
但是我再打开着两个选项,问题没有复现,有点摸不着头脑