Reputation: 6595
docker run
throws an "invalid reference format: repository name must be lowercase" error when using $(pwd)
in the volume flag (-v
). This is the command that is currently causing the issue:
docker run --rm -v $(pwd)/app/polymer:/home/polymer/app jefferyb/polymer-cli polymer build
Upvotes: 10
Views: 13446
Reputation: 6595
For my own circumstance, the output of pwd
contained a directory with a space (i.e. /something/Problematic Directory/something-else). This was resolved by wrapping $(pwd)
in quotation marks to explicitly identify it as a string:
docker run --rm -v "$(pwd)/app/polymer":/home/polymer/app jefferyb/polymer-cli polymer build
The documentation I read didn't use quotation marks, however this might be better practise when using variable interpolation in shell to avoid these kind of issues.
Upvotes: 15