Skip to content
This repository has been archived by the owner on Mar 11, 2020. It is now read-only.

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

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

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

alexkli opened this issue Aug 5, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@alexkli
Copy link
Contributor

alexkli 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 alexkli added the bug Something isn't working label Aug 5, 2019
@alexkli
Copy link
Contributor Author

alexkli 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 as completed Aug 6, 2019
@alexkli alexkli self-assigned this Aug 6, 2019
@moritzraho
Copy link
Member

@alexkli ok thanks works great now 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants