Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker errors when spaces or uppercase chars in src path #8

Closed
alexkli opened this issue Aug 5, 2019 · 2 comments

Comments

@alexkli
Copy link
Contributor

commented Aug 5, 2019

Originally reported by @moritzraho

  • Error if uppercase in src file path:
wskdebug hello Uppercase/hello.js
Error: Command failed: docker run -d --name wskdebug-hello-1564994363895 --rm -m 268435456 -p 8080 -p 9229:9229 -v /Users/xxxx/demos/Uppercase/hello:/code adobeapiplatform/adobe-action-nodejs-v10:3.0.13 node --expose-gc --inspect=0.0.0.0:9229 app.js
docker: invalid reference format: repository name must be lowercase.
See 'docker run --help'.

This might be still ok as docker's error is pretty specific

  • Error when space:
wskdebug hello "space path"/hello.js
Error: Command failed: docker run -d --name wskdebug-hello-1564994363895 --rm -m 268435456 -p 8080 -p 9229:9229 -v /Users/xxxx/demos/space path/hello:/code adobeapiplatform/adobe-action-nodejs-v10:3.0.13 node --expose-gc --inspect=0.0.0.0:9229 app.js
docker: invalid reference format.
See 'docker run --help'.

This is not ok as there is no mention of what caused the error

@alexkli

This comment has been minimized.

Copy link
Contributor Author

commented Aug 6, 2019

These are two instances of the same issue - a space in the path. The uppercase message is just a confusing side aspect, since Docker parses the docker run command line not as intended.

For me the first happens if the space is in a higher directory

-v /Users/alex/Work/code/nui/wskdebug/examples/with space/Uppercase:/code

whereas the second happens if the leaf directory has a space:

-v /Users/alex/Work/code/nui/wskdebug/examples/with space:/code

I assume in your example the left out xxxx has spaces as well.

The problem is that the -v mount argument to docker run was not properly enclosed with quotes. See also here.

Fixed in bf8cfff.

@alexkli alexkli closed this Aug 6, 2019

@alexkli alexkli self-assigned this Aug 6, 2019

@moritzraho

This comment has been minimized.

Copy link
Collaborator

commented Aug 6, 2019

@alexkli ok thanks works great now 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.