项目场景
Mac上通过docker安装prometheus;
问题描述
docker run时,会出现下面的报错,导致容器启动失败:
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 "/usr/local/prometheus/config/prometheus.yml" to rootfs at "/etc/prometheus/prometheus.yml": mount /usr/local/prometheus/config/prometheus.yml:/etc/prometheus/prometheus.yml (via /proc/self/fd/14), 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.
原因分析
错误信息,显示挂载配置文件失败,导致容器启动失败。
解决方案
方法一:仔细检查挂载路径是否存在,如果不存在,需要提前创建好;
关于do