Tuesday, July 15, 2014

Docker repository for Openhab 1.5.0

I just finished a Docker repository for Openhab 1.5.0 which allows faster deployment.  The repo is available here:
https://registry.hub.docker.com/u/tdeckers/openhab/

The source code for the repository is available from github:
https://github.com/tdeckers/docker-openhab

Assuming you have docker installed on your machine, these are the few steps to take to get openhab up and running.

  1. Create a config directory and store your openhab configuration files there.  This is the content of [OPENHAB_HOME]/configurations and will be injected into the container.  Let's assume you chose /tmp/config.
  2. Add a file called addons.cfg into that same config directory.  This file is used to determine which plugins to enable for your deployment.  Each line in the config file should have the name of the addon jar file to load. My file looks like this:
# cat config/addons.cfg
org.openhab.action.squeezebox-1.5.0.jar
org.openhab.action.xmpp-1.5.0.jar
org.openhab.binding.configadmin-1.5.0.jar
org.openhab.binding.exec-1.5.0.jar
org.openhab.binding.http-1.5.0.jar
org.openhab.binding.knx-1.5.0.jar
org.openhab.binding.mqtt-1.5.0.jar
org.openhab.binding.networkhealth-1.5.0.jar
org.openhab.binding.ntp-1.5.0.jar
org.openhab.binding.serial-1.5.0.jar
org.openhab.binding.squeezebox-1.5.0.jar
org.openhab.binding.wol-1.5.0.jar
org.openhab.io.multimedia.tts.marytts-1.5.0.jar
org.openhab.io.squeezeserver-1.5.0.jar
org.openhab.persistence.cosm-1.5.0.jar
org.openhab.persistence.db4o-1.5.0.jar
org.openhab.persistence.gcal-1.5.0.jar
org.openhab.persistence.logging-1.5.0.jar
org.openhab.persistence.rrd4j-1.5.0.jar
  1. Run docker:
    docker run --rm -p 80:8080 -v /tmp/config:/opt/openhab/configurations tdeckers/openhab
Now you can access the openhab installation on port 80 of your host.

Enjoy.

No comments:

Post a Comment