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
For my own circumstance, the output of pwd
contained a directory with a space (ie /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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.