I am running openhab in LXC right now and want to switch to docker.
-
I did a backup and copied the file to a host directory
-
I unzipped the backup file. I got userdata, backup-properties and con as folders with content
-
I started the docker container. Directory “addons” was added.
Termin:
docker run --name openhab --network=nextcloudpi -p 8091:8080 -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro -v /docker/volumes/openhab/addons:/openhab/addons -v /docker/volumes/openhab/conf:/openhab/conf -v /docker/volumes/openhab/userdata:/openhab/userdata -e "CRYPTO_POLICY=unlimited" -e "EXTRA_JAVA_OPTS=-Duser.timezone=Europe/Berlin" -d --restart=always openhab/openhab:latest
-
Got the error:
Launching the openHAB runtime...
null
Error occurred shutting down framework: java.lang.NumberFormatException: null
java.lang.NumberFormatException: null
at java.base/java.lang.Integer.parseInt(Integer.java:614)
at java.base/java.lang.Integer.parseInt(Integer.java:770)
at org.apache.karaf.main.ConfigProperties.<init>(ConfigProperties.java:251)
at org.apache.karaf.main.Main.updateInstancePidAfterShutdown(Main.java:232)
at org.apache.karaf.main.Main.main(Main.java:197)
- Tried the restore with the console, but I get the error:
openHAB is running! Please stop the process before restoring.
I do not know how to stop the openhab service in the docker container. If I stop the whole container, I cannot run the restore.
I tried to stop the openhab service with /openhab/bin/stop
, but this stops the whole container.
I also tried systemctl service stop openhab3.service