I am actual searching the net for the same question.
Initially I activated USBIP (too much traffic)
Then found ser2net/socat in many posts.
Then some person asking for “why socat” when OH supports rfc2217 since 2.5
So I found this thread:
success story for RFC 2217/Z-Wave (andematt 258/269)
But as you I want to switch do docker and to zwave-js-ui grapping full support fo my serial/usb.
Will sum up here, if I found out if/how rfc2217 can be used in the zwave-js-ui container
As far as I could not see support OOTB (in any documentation) I started: