【发布时间】:2021-02-10 02:22:18
【问题描述】:
运行此撰写时我哪里出错了?
我只想使用持久卷上传这个容器
撰写:
version: '3.1'
services:
prometheus:
image: prom/prometheus
container_name: meta_prometheus
volumes:
- ./config:/etc/prometheus/prometheus.yml
- ./data:/prometheus/data
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus/data'
ports:
- 9090:9090
控制台:
[root@prometheus docker]# docker-compose up -d
Creating meta_prometheus ... error
ERROR: for meta_prometheus Cannot start service prometheus: oci runtime error: container_linux.go:235: starting container process caused "container init exited prematurely"
ERROR: for prometheus Cannot start service prometheus: oci runtime error: container_linux.go:235: starting container process caused "container init exited prematurely"
ERROR: Encountered errors while bringing up the project.
【问题讨论】:
-
检查你的文件夹或文件配置和数据的权限(如果是linux ls -lh),突然他们与用户ROOT。
标签: linux docker docker-compose prometheus