Koozali.org: home of the SME Server

Homebridge in a Docker Container on SME

Offline waldviertler

  • ***
  • 107
  • +0/-0
Homebridge in a Docker Container on SME
« on: February 28, 2018, 12:22:29 PM »
Hello

I wonder if somebody had successfully installed Homebridge in a Docker container on SME.
I have installed Docker on SME, but do not know how to go further.

Thank you for any help.

Martin

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: Homebridge in a Docker Container on SME
« Reply #1 on: March 01, 2018, 12:32:19 PM »
I've just started playing with Docker.... it's an uphill curve :-)

Some good basics reading:

https://www.tecmint.com/install-docker-and-learn-containers-in-centos-rhel-7-6/

First thing is trying a search:

Code: [Select]
docker search homebridge
Here's a guide on setting it up:

https://hub.docker.com/r/oznu/homebridge/

This one uses a docker manager rather than manual install but you can use the above manual instructions to use this image:

https://hub.docker.com/r/marcoraddatz/homebridge/

Some gotchas....

Not all images will run on the version of Docker on SME 9.x so YMMV.

Make sure you give the image a name with --name so you can refer to it by name

You can start and stop it with

Code: [Select]
docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
dbdef4149922        some.image         "blah blah"      9 hours ago         Up 7 seconds                            homebridge 

Code: [Select]
docker start/stop dbdef4149922
or

Code: [Select]
docker start/stop homebridge
Networking.... this bit does my head in....

By default the container will get an IP of something like 172.17.42.1

You will have to set up something to send commands to and from the IP on your server. If say it ran a web application on port 80 you would need to either proxy that address with a web template or directly redirect a local port to that ip:port with something like iptables (I think !!)

If you want to access services on localhost you need to add --net="host" at the docker run command.

This means that any services on the docker container are valid 'localhost' services from the server so beware of port conflicts and security issues (have a Google for more)

I believe you could also set it to another 'Local IP' though I have not tried this as yet.

There is more information and links here:

https://wiki.contribs.org/Docker
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: Homebridge in a Docker Container on SME
« Reply #2 on: March 01, 2018, 02:10:24 PM »
I just found i had some code to create a 'smeserver-docker' contrib to set up the basic config.

I'll have a look at putting it together properly.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline waldviertler

  • ***
  • 107
  • +0/-0
Re: Homebridge in a Docker Container on SME
« Reply #3 on: March 01, 2018, 02:38:59 PM »
Dear ReetP

Thank you very much for your informative reply!!
I hope my learning curve will also go uphill.
 :-P

Thanks again
Martin

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: Homebridge in a Docker Container on SME
« Reply #4 on: March 01, 2018, 05:46:05 PM »
Dear ReetP

Thank you very much for your informative reply!!


No problems - I had just started playing myself.

Quote
I hope my learning curve will also go uphill.

I am sure it will !!!

I'll try and do a little RPM so it sets docker stuff up.

I am still making notes and will add to the wiki once i have understood a little more.

Please follow up if you have questions.

B.. Rgds
John
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation