In my case this was happening because I missed adding a : after the volume name.
Instead of:
volumes:
- mysqldata:
I had typed:
volumes:
- mysqldata
docker-compose up gave me the same error as above.
In my case this was happening because I missed adding a : after the volume name.
Instead of:
volumes:
- mysqldata:
I had typed:
volumes:
- mysqldata
docker-compose up gave me the same error as above.