Docker安装mysql5.7
Docker安装MySQL5.7
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,就行了
喜欢请赞赏一下啦^_^