why would you like to do that ?
As far as I understand there is only one process ( java ) running in that container and in case you would kill that process it would be restarted because of restart=always.
You don’t. Once the openHAB process ends the container ends too. In general containers are not really set up to support running multiple processes at the same time. There’s no init daemon nor any systemd daemon controlling startup and shutdown of services. And once the one process that is running in the container, the container itself exists.
You can run more than one service at a time in a container but that’s some what of an anti-pattern, though sometimes unavoidable. But to do that you have to set it up to support that yourself by running one or more of the processes in the background. But still the container will exit when the primary process exits so when you kill openHAB the container will exit too, taking all the other processes running in the background down with it.
A container is not a virtual machine. It is not a full OS with multitasking and all the services necessary to run a modern machine. When a Docker image is well designed, it contains just enough to run the one service and nothing more.