docker安装mysql

问题

ERROR: for mysql5.7 Cannot start service mysql: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting “/home/docker/mysql/conf.d” to rootfs at “/etc/mysql/conf.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

ERROR: for mysql Cannot start service mysql: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting “/home/docker/mysql/conf.d” to rootfs at “/etc/mysql/conf.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

解决

自动生成的文件都是文件夹,my.cnf改成文件即可部署成功
请添加图片描述

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐