I am using Docker compose to create 5 containers in VM and i want to mount the azure files share to each container.
my docker-compose.yml file is as follow :
version: '3.8'
services:
jenkins:
image: jenkins/jenkins:lts
user: root
privileged: true
container_name: jenkins
ports:
- 8080:8080
volumes:
- "jenkins_home:/var/jenkins_home"
- "/var/run/docker.sock:/var/run/docker.sock"
sonarqube:
image: sonarqube:latest
ports:
- "9000:9000"
volumes:
- sonarqube_data:/opt/sonarqube/data
- sonarqube_logs:/opt/sonarqube/logs
- sonarqube_extensions:/opt/sonarqube/extensions
environment:
- SONARQUBE_JDBC_URL=jdbc:postgresql://postgres:5432/sonarqube
- SONARQUBE_JDBC_USERNAME=username
- SONARQUBE_JDBC_PASSWORD=password
depends_on:
- postgres
postgres:
image: postgres:latest
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_DB=username
nexus:
image: sonatype/nexus3
container_name: nexus
ports:
- "8082:8081"
volumes:
- "nexus_data:/nexus-data"
prometheus:
container_name: prometheus
image: prom/prometheus:latest
ports:
- "9090:9090"
volumes:
- prometheus_data:/etc/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--enable-feature=remote-write-receiver"
grafana:
container_name: grafana
image: grafana/grafana:latest
ports:
- "3000:3000"
environment:
- GF_PATHS_PROVISIONING=/etc/grafana/provisioning
volumes:
- grafana_data:/var/lib/grafana
depends_on:
- prometheus
volumes:
jenkins_home
driver: azure
driver_opts:
share: jenkins_home
storage_account_name: storage
storage_account_key: key
sonarqube_data:
driver: azure
driver_opts:
share_name: sonarqube_data
storage_account_name: storage
storage_account_key: key
sonarqube_logs:
driver: azure
driver_opts:
share_name: sonarqube_logs
storage_account_name: storage
storage_account_key: key
sonarqube_extensions:
driver: azure
driver_opts:
share_name: sonarqube_extensions
storage_account_name: storage
storage_account_key: key
nexus_data:
driver: azure
driver_opts:
share_name: nexus-data
storage_account_name: storage
storage_account_key: key
prometheus_data:
driver: azure
driver_opts:
share_name: prometheus_data
storage_account_name: storage
storage_account_key: key
grafana_data:
driver: azure
driver_opts:
share_name: grafana-data
storage_account_name: storage
storage_account_key: key
And i did install the plugins from microsoft :
https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-containers-volume-logging-drivers#using-your-own-volume-or-logging-driver
Yet i encounter this type of error the
enter image description here
even when i changed the docker compose file to create the azure share file as follow i changed the volume :
volumes:
jenkins_home:
driver: azure
sonarqube_data:
driver: azure
sonarqube_logs:
driver: azure
sonarqube_extensions:
driver: azure
nexus_data:
driver: azure
prometheus_data:
driver: azure
grafana_data:
driver: azure
it create the azure share file yet i got a permission error
enter image description here
ANY HELP Please i have a share file already created and i want to mount it to the containers via docker compose