Docker安装mysql5.7.240109

docker pull mysql:5.7
docker run 

Note:

报错:

docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/mysql/conf" to rootfs at "/etc/my.cnf": mount /home/mysql/conf:/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.

处理:

  • cd到 /home/mysql/conf
  • vi 一个 my.cnf
  • 然后chmod 775 my.cnf
  • 然后 docker rm后,再run,就行了
posted @ 2025-01-06 09:36  中国的Amadeus  阅读(34)  评论(0)    收藏  举报