Docker Community Forums

Share and learn in the Docker community.

ERROR: invalid volume specification: '/home/hpatel/Desktop/demodocker/my.conf: /etc/mysql/conf.d/config-file.cnf:rw': invalid mount config for type "bind": invalid mount path: ' /etc/mysql/conf.d/config-file.cnf' mount path must be absolute

Hello Team
How to resolve this error

my docker compose content is like this

version: “3”

networks:
web-network:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.10.1.0/24
db-network:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.10.2.0/23

services:
mydb:
#image: mysql:5.6
build: ./mysql
container_name: mydb

command: --default-authentication-plugin=mysql_native_password
networks: 
  db-network:
    ipv4_address: 172.10.3.2
ports: 
  - 7703:3306
env_file: 
  - ./devlopment.env
environment: 
  MYSQL_DATABASE: legacy
volumes: 
  - "./mysql/data:/var/lib/mysql:rw"
  - "./my.conf:/etc/mysql/conf.d/config-file.cnf"

myweb:
build: ./web
container_name: myweb
networks:
db-network:
ipv4_address: 172.10.2.2
web-network:
ipv4_address: 172.10.1.2
ports:
- 8081:80
depends_on:
- mydb
volumes:
- ./web/src:/var/www/html