使用docker创建mysql容器出错:
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/data/mysql/my.cnf" to rootfs at "/etc/my.cnf": mount /data/mysql/my.cnf:/etc/my.cnf (via /proc/self/fd/6), flags: 0x5000: 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
解决方法:
原因是因为挂载数据文件时 /conf/nginx.conf 是以一个目录生成,而不是文件!!!
所以:删除nginx.conf 目录,然后新建一个nginx.conf 文件就可以了。