I reply to myself to say that I solved this problem (it is actually mentioned 
in the documentation) with a chown of /usr/lib/node_modules and /usr/bin. So I 
was able to install wskdebug.

However wskdebug in current shape does not work in my two use cases.

One use case is the one I mentioned: I am running an editor with theia in a 
docker image, so I installed it inside a docker image.

Unfortunately wskdebug assumes I can contact the debugging server in 
localhost:9229. This is the case if I am running wskdebug OUTSIDE docker but 
not if I am running INSIDE. 

Also I have another use case where I have to run it: a production with 
kubernetes cluster with actions. Some actions are using redis, kafka and 
buckets. Unfortunately the debugger runs the action in the local docker, and 
the local action cannot reach the services inside the cluster.

-- 
  Michele Sciabarra
  mich...@sciabarra.com

----- Original message -----
From: Michele Sciabarra <mich...@sciabarra.com>
To: dev@openwhisk.apache.org
Subject: Wskdebug, does it work in a docker image?
Date: Wednesday, February 19, 2020 7:25 PM

Hello, 

I am trying to build an openwhisk IDE, using eclipse theia as a starting point.
I already packages standalone openwhisk as a docker image, and I contributed 
the effort.
Theia runs from another docker image.

I am now trying to run wskdebug in the theia docker container.

Note I am able to run  "wsk" from theia  and I have also docker in the image 
and the docker socket mounted, so I can also do docker ps, docker create etc.

But if I try to install wskdebug in the image it fails.

You can easily replicate the issue with `docker run -ti node:10 bash` and then 
run `npm install -g @adobe/wskdebug`

I see errors like:

````
ngrok - error storing binary to local file { [Error: EACCES: permission denied, 
open 
'/usr/local/lib/node_modules/@adobe/wskdebug/node_modules/ngrok/bin/aHR0cHM6Ly9iaW4uZXF1aW5veC5pby9jLzRWbUR6QTdpYUhiL25ncm9rLXN0YWJsZS1saW51eC1hbWQ2NC56aXA=.zip']
  errno: -13,
  code: 'EACCES',
````



-- 
  Michele Sciabarra
  mich...@sciabarra.com

Reply via email to