smartthings icon indicating copy to clipboard operation
smartthings copied to clipboard

Provide a Docker images

Open jchadwick opened this issue 8 years ago • 6 comments

Make it easier for people to get up and running by creating a Docker image for them.

jchadwick avatar Feb 18 '17 17:02 jchadwick

Assuming noone else has looked into this, I'm getting into it right now and can send a PR when I'm done.

jchadwick avatar Feb 18 '17 17:02 jchadwick

That would be great! Look forward to it...

redloro avatar Feb 25 '17 07:02 redloro

I'm working on moving to Docker myself, and have built a Docker image for the node-proxy for Raspberry Pi. Haven't tested it except with the generic plugin but here it is:

https://hub.docker.com/r/tcjennings/rpi-smartthings-nodeproxy/

To run it you should create a config.json somewhere on your host, then:

docker run -itd -p 8080:8080 -e ENABLED_PLUGINS="generic" \
-v /path/to/config.json:/sntp/config.json \
--device /dev/ttyUSB0 \
tcjennings/rpi-smartthings-nodeproxy:latest

The ENABLED_PLUGINS should be a space-separated list of the plugin names to enable (without the .js extension). I think you need Docker 1.12 for the --device directive, which is necessary to give the container control of the USB serial port.

Probably want a restart policy and a friendly name too. I'm going to work on a docker-compose file to make execution trivial.

Edit: I made the docker-compose.yml file. See https://github.com/tcjennings/docker-build/tree/master/rpi-smartthings-nodeproxy.

tcjennings avatar Mar 24 '17 02:03 tcjennings

Awesome... will take a look at it this weekend!

redloro avatar Mar 24 '17 03:03 redloro

I just migrated my production Pi to use Docker and it works. I'd never done the hardware device pass-through in a container before so I wasn't sure how it'd go. Seems fine. I used the compose file to fire it up, and used my existing working config.json. Compose does all the heavy lifting.

tcjennings avatar Mar 24 '17 03:03 tcjennings

Refer to PR #13

tcjennings avatar Jul 24 '17 00:07 tcjennings