Resin CLI installation instructions for containers

resin-cli

#1

Hello, my Resin applications are generally rooted at resin/raspberrypi3-debian:latest and I would like to integrate the Resin CLI into my environment to get more functionality from the Resin APIs. Now, I see the installation instructions here, but I’ve had a very tough time getting node to install as part of my system package installation Dockerfile stanza. After trying a few options found on the Internet, I basically gave up.

What is the correct Node installation incantation for Debian? I’ll be honest that I’d prefer not to take a NodeJS dependency in my container if I don’t already have this. Are there other CLI variants that I could use?

Thanks!

Edit: here’s an example of the last attempt to get NodeJS installed (setup_6.x and setup_8.x each failed in different ways):

RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - \
     && apt-get install -y --no-install-recommends \
     nodejs \
     && npm install --global --production resin-cli

I currently interact with the Resin APIs through a Python wrapper around the Resin SDK for Python: https://github.com/resin-io/resin-sdk-python


#4

Is npm and nodejs installed on your workstation/laptop? Not sure why Docker or your Dockerfile are entering the picture.

I just installed as per instructions, all good.


#5

Thanks for the feedback. I use the Resin APIs from the Resin-deployed applications to discover the expected topology of devices in other applications, so I need Resin CLI deployed to my devices, not my development environment/laptop. As I mentioned, I created a lightweight wrapper around the Python SDK for this but I’d like the more full-featured CLI if possible.

Edit: I’ve edited the title of this thread to make the intent more clear.


#7

Hi, we have the base images with nodejs preinstalled come with few variants (https://docs.resin.io/runtime/resin-base-images/#-a-name-node-a-docker-node, base images for raspberry pi 3 https://docs.resin.io/runtime/resin-base-images/#-a-name-node-a-docker-node). With these images, you can just install resin-cli without worrying about other dependencies (If you use the Slim variant, you might need few dependencies like python or git since we don’t preinstall them).


#8

Thank you. I’ll give this a try.