Thanks to various people here helping me to understand a bit more about containers and some searching and experimentation I now have a container to run my little Python 2 scanner app within Debian 12.
It's distrobox which is a sort of wrapper for podman and gives one an easy to use interface for installing various linux distros in containers. I have used it to create a instance of ubuntu 18.04 on my Debian 12 desktop system. My scanner driver (which comes as a .deb) installed OK and with the addition of some packages from ubuntu 18.04 it runs without any problem. The nice thing about the distrobox container is that you can run a program in it that is in your normal $HOME environment of the parent system. It's only all the libraries and support files that are 'virtualised'. Also, Ubuntu 18.04 is supported until 2029 so I have a few years when it should continue to 'just work'. :-) -- Chris Green ยท