Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker安装prometheus有误 #85

Open
troub1emaker0911 opened this issue Nov 27, 2020 · 2 comments
Open

docker安装prometheus有误 #85

troub1emaker0911 opened this issue Nov 27, 2020 · 2 comments

Comments

@troub1emaker0911
Copy link

您好!
采用你的命令安装,一直提示如下错误:
[root@vm-ecs-104 ~]# docker run -p 9090:9090 -v /etc/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"rootfs_linux.go:58: mounting \\\"/etc/prometheus/prometheus.yml\\\" to rootfs \\\"/var/lib/docker/overlay2/2101fbe118b3d1f5c38d83fa80464e53a0aa1851089dcce978525f815c66c80d/merged\\\" at \\\"/var/lib/docker/overlay2/2101fbe118b3d1f5c38d83fa80464e53a0aa1851089dcce978525f815c66c80d/merged/etc/prometheus/prometheus.yml\\\" caused \\\"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.

查看了本机的/etc/prometheus目录,发现prometheus.yaml被创建成了目录,而不是文件。建议修改下。

另:推荐还是用Linux系统演示,发现好多都是MacOS的安装包。

@moxuec
Copy link

moxuec commented Jan 27, 2021

同样遇到了这个问题

@lautumn1990
Copy link

应该是要先创建配置文件, 然后采用docker挂载,否则会创建成文件夹

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants