I am trying to set physical path to my volume that used in Spring Boot project with docker. When i try to up my docker-compose it shows error
Cannot start service sb-service: error while creating mount source path '/usr/share/nginx/html/image': mkdir /usr/share/nginx: read-only file system
I set chmod 777 to
/usr/share/nginx
/usr/share/nginx/html
/usr/share/nginx/html/image
also i created image folder with sudo mkdir image
as well.
This is my docker compose file
sb-service:
image: sb-service
container_name: sb-service
environment:
SPRING_DATASOURCE_URL: 'jdbc:mysql://mysql_db:3306/ECommerce?useUnicode=yes&characterEncoding=UTF-8&useSSL=false'
ports:
- '8085:8085'
expose:
- '8085'
volumes:
- /usr/share/nginx/html/image:/root/images