Openhab 3.0 docker image does not expose the ports

In my previous OH 2.5 docker container the 8080 and 8443 ports where neatly exposed. In the new OH 3 docker container the ports where not exposed. As workaround I created with the use of [portainer.io] a new image based on the OH3 docker image that exposed port 8080 and port 8443. Then it worked. Where to register this issue?

I am running OH3 in docker and port 8080 is definitely exposed. I use Docker CE directly though, not portainer.

I don’t know what Docker image you use, but the official OH3 image already exposes the ports:

1 Like

Also updated a docker image from RC2 to main release, for some reason the 8080 was redirected to 32774.
I am not very keen in using docker, maybe you have the same issue?

What docker run command did you use>? That is where the port mapping occurs.

Sounds like you didn’t map the container port to an external port, and it assigned a random one. start the container with the -p option e.g. -p 8080:8080

Ah thanks both! I did used the UI from Synology, which set the ports to AUTO assign.

I checked 2.5 and that docker image shows the docker file details as follows in portainer:

Dockerfile details

CMD gosu openhab tini -s ./start.sh
ENTRYPOINT /entrypoint.sh
EXPOSE 5007/tcp 8080/tcp 8101/tcp 8443/tcp
VOLUME /openhab/addons /openhab/conf /openhab/userdata
ENV
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ARCH x86_64
UBUNTU_SUITE buster
DOCKER_REPO multiarch/debian-debootstrap
JAVA_URL https://cdn.azul.com/zulu/bin/zulu8.42.0.23-ca-jdk8.0.232-linux_x64.tar.gz
JAVA_VERSION 8
OPENHAB_URL https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.5.2%2Fopenhab-2.5.2.zip
OPENHAB_VERSION 2.5.2
CRYPTO_POLICY limited
EXTRA_JAVA_OPTS
GROUP_ID 9001
KARAF_EXEC exec
LC_ALL en_US.UTF-8
LANG en_US.UTF-8
LANGUAGE en_US.UTF-8
OPENHAB_BACKUPS /openhab/userdata/backup
OPENHAB_CONF /openhab/conf
OPENHAB_HOME /openhab
OPENHAB_HTTP_PORT 8080
OPENHAB_HTTPS_PORT 8443
OPENHAB_LOGDIR /openhab/userdata/logs
OPENHAB_USERDATA /openhab/userdata
USER_ID 9001
JAVA_HOME /usr/lib/jvm/default-jvm

The OH3 docker image from docker.io (portainer pulls it from there) shows this in portainer:

Dockerfile details
CMD gosu openhab tini -s ./start.sh

I am pretty new to docker and portainer. So I might have been an issue on my side. I just noticed that the OH2.5 is also not showing the exposed ports in portainer, but it fact is was exposing them. I first started with OH2.5 using docker and recently I added portainer to manage the growing number of docker apps.

Regards, Milé

If you run the container in network mode “host” the ports don’t have to be exposed because it will expose them all. Docker will then also ignore any configuration for exposing ports.