Running OpenHAB 3.4RC1 in Docker Desktop

Hi community, I am running OpenHAB (since 3.2 now 3.4RC1) in docker desktop and it works all just find. Particularly switching between versions and migrating is a piece of cake - that’s why I just love it. I am using volumes on my local machine to capture all user data. here is my docker run command:

docker run -itd --name PetasOpenHAB --restart unless-stopped -e "CRYPTO_POLICY=unlimited" -e "EXTRA_JAVA_OPTS=-Duser.timezone=Europe/Berlin" -p 8081:8081 -p 8082:8082 -p 8443:8443 -p 8080:8080 -p 8899:8899 --device=/dev/ttyUSB0 --device=/dev/ttyUSB1 -v /usr/bin/ffmpeg:/usr/bin/ffmpeg -v "D:\Docker\openhab\conf":/openhab/conf -v "D:\Docker\openhab\addons":/openhab/addons -v "D:\Docker\openhab\userdata":/openhab/userdata "openhab/openhab:3.4.0.RC1"

Here is my question: Since docker creates internal IP addresses, the IP cam binding reports back a 127.x.x.x address but my local server is at 192.168.x.x., Is there any way to bridge this?

Thx in advance for your help

Hi folks, not much response in here. In the meantime I am running OpenHab 3.4 on the latest Docker fpr Desktop and don’t want to miss it anymore. Migration to a new OpenHAB version is a matter of minutes as I have used volumes for my user specific data. I am using the follwoing docker run command:

docker run -itd --name MyOpenHAB --restart unless-stopped -e "CRYPTO_POLICY=unlimited" -e "EXTRA_JAVA_OPTS=-Duser.timezone=Europe/Berlin" -p 8080-8082:8080-8082 -p 8443:8443 -p 8899:8899 -p 20060:20060 --device=/dev/ttyUSB0 --device=/dev/ttyUSB1 -v "C:\\Data\Docker\openhab\conf":/openhab/conf -v "C:\\Data\Docker\openhab\addons":/openhab/addons -v "C:\\Data\Docker\openhab\userdata":/openhab/userdata openhab/openhab:latest

It still has some issues:

  1. The USB serial ports are not present after reboot (and very unstable, need to restart usbipd quit often)
  2. the ipcamera binding uses the docker cntainer IP (that isunknown to the outside network) for the video stream, so the cam’s don’t work even though the binding connect is green.

Any ideas on how to solve this is much appreciated.