Skip to content

wayneconnolly/openhab2-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

openhab

Openhab 2.0 for Amazon Echo

So just a few heads up here.

RUN adduser --disabled-password --gecos '' --home ${APPDIR} openhab &&\

to

RUN adduser -u 1001 --disabled-password --gecos '' --home ${APPDIR} openhab &&\
docker build -t openhab .
  • Created a user on my host called openhab with
sudo useradd -u 1001 openhab
  • Start docker without any config volumes shared except localtime:
docker run --name=openhab --net=host -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro -d openhab
  • Copied the docker contents to my host with the below (find your own container ID via docker ps
docker cp 07860dca4899:/openhab /home/kodi/docker/openhab
  • Stop/remove the docker container
docker rm -f openhab
  • Make the openhab user the owner of the 'openhab' dir on my host
sudo chown -R openhab:openhab openhab
  • Start openhab again that maps volumes to my host
docker run --name=openhab --net=host -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro -v /home/kodi/docker/openhab/conf:/openhab/conf -v /home/kodi/docker/openhab/userdata:/openhab/userdata -v /home/kodi/docker/openhab/addons:/openhab/addons --restart always -d openhab
  • Now we have a stable and persistent openhab running.

Hope this helps someone.

About

Openhab 2.0 for Amazon Echo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages