Hi everone, when I run “docker compose -f docker-compose.yml up -d”
I receve this message: service “nginx” refers to undefined volume www-data: invalid compose project
My compose:
####################################
version: “3”
services:
nginx:
image: nginx:latest
container_name: nginx
volumes:
- www-data:/usr/share/nginx/html
ports:
- 80:80
volumes:
www-data:
####################################
If I use the volume in the format /var/data/www-data:/usr/share/nginx/html the container works, any suggestions?