I am on Docker Version 20.07 and i am trying to Mount my config files.
My Docker compose looks like this -:
version: '2'
services:
prometheus:
image: prom/prometheus
ports:
- '9090:9090'
container_name: prometheus
restart: always
volumes:
- './prometheus/prometheus.yml:/etc/prometheus/prometheus.yml'
grafana:
image: grafana/grafana
ports:
- '3000:3000'
container_name: grafana
restart: always
depends_on:
- prometheus
volumes:
- './grafana/config/grafana.ini:/etc/grafana/grafana.ini'
And my Folder structure looks like this :-
Root
Monitoring_Stack
-- prometheus.yml
-- grafana.ini
-- docker-compose.yml
And when i do docker-compose up -d, I keep getting :-
ERROR: for prometheus Cannot start service prometheus: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "/run/desktop/mnt/host/d/Docker/monitoring_stack/prometheus/prometheus.yml" to rootfs at "/etc/prometheus/prometheus.yml" 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: Encountered errors while bringing up the project.
Any help will be appreciated as to what i am doing wrong? Thank you.