Skip to content

Instantly share code, notes, and snippets.

@natanlao

natanlao/volume.md

Last active Apr 19, 2020
Embed
What would you like to do?
docker-compose: no declaration was found in the volumes section

If, when doing something like docker-compose up, you run into an error like this:

ERROR: Named volume "server/db:/usr/share/nginx/html/db:rw" is used in service "web" but no declaration was found in the volumes section.

You're missing a leading ./, so, for example:

volumes:
 - 'server/db:/usr/share/nginx/html/db'

should read

volumes:
 - './server/db:/usr/share/nginx/html/db'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.