Setting up Kate with LSP server running in Docker

Hello and Good day,
I am in the process of setting up kate to work with lsp server running in docker.

im trying to run python-lsp-server with kate.
the reason for running it in docker is because i have immutable distro (SteamOS) and can not install the package globally.
I was able to get pylsp working by installing it inside a Virtual environment but i wish to install other lsp.

for example : github[.]com/Microsoft/vscode/tree/main/extensions/html-language-features/server and other lsp for JS, css and others which most of them are written node, which can not be installed on my system.

i was hoping that using docker to setup containers for the lsp would be the best way to get it all working without having to resort to modifying the system.
my kate lsp-client user config looks something like this

{
    "servers": {
        "python": {
            "command": [
                "/usr/bin/docker",
                "run",
                "-it",
                "--rm",
                "pylsp-img"
            ],
            "url": "github[.]com/python-lsp/python-lsp-server",
            "highlightingModeRegex": "^Python$",
            "settings": {
                "pylsp": {
                    "plugins": {
                        "jedi_completion": {
                            "enabled": true,
                            "include_params": true
                        },
                        "pycodestyle": {
                            "enabled": false
                        }
                    }
                }
            }
        }
    }
}

the Error im reciving in Kate is

[01:49:24  LSP Client Log] Started server python@/home/deck: /usr/bin/docker run -t -i --rm -e PYTHONUNBUFFERED=1 pylsp-img
[01:49:24  LSP Server Log] python@/home/deck
the input device is not a TTY
[01:49:24  LSP Client Warning] Server terminated unexpectedly ... NOT Restarting [/usr/bin/docker run -t -i --rm -e PYTHONUNBUFFERED=1 pylsp-img] [homepage: github[.]com/python-lsp/python-lsp-server]
[01:52:30  LSP Client Log] Started server python@/home/deck: /usr/bin/docker run -it --rm pylsp-img
[01:52:30  LSP Server Log] python@/home/deck
the input device is not a TTY
[01:52:30  LSP Client Warning] Server terminated unexpectedly ... Restarting [/usr/bin/docker run -it --rm pylsp-img] [homepage: github[.]com/python-lsp/python-lsp-server]
[01:52:32  LSP Client Log] Started server python@/home/deck: /usr/bin/docker run -it --rm pylsp-img
[01:52:32  LSP Server Log] python@/home/deck
the input device is not a TTY

from which it seems that kate can not communicate with the lsp over StdIO (using standard input and output streams) if its running in docker.
i have tested with running docker container with and without the -it and have also tried running with just -i and just -t and both case almost same issue.

the method of running lsp server in docker and using them is possible according to this emacs-lsp[.]github[.]io/lsp-mode/tutorials/docker-integration/

Im here seeking some help because im a noob when it comes to this stuff.
if this gets somehow to work it would be really great. I hope someone out there can either help or guide me in the right direction.

for anyone from future.
I was able to get it working the issue seems to be something with my docker image.

by looking through the code of lspcontainers.nvim i was able to get the docker cmd for how to setup the container

the following is my user server settings

{
    "servers": {
        "python": {
            "command": [
                "docker",
                "run",
                "-i",
                "--rm",
                "-v",
                "/home:/home",
                "docker.io/lspcontainers/python-lsp-server"
            ],
            "url": "https://github.com/python-lsp/python-lsp-server",
            "highlightingModeRegex": "^Python$",
            "settings": {
                "pylsp": {
                    "plugins": {
                        "jedi_completion": {
                            "enabled": true,
                            "include_params": true
                        },
                        "pycodestyle": {
                            "enabled": false
                        }
                    }
                }
            }
        }
    }
}

the docker containers provided by lspcontainers can be found here
https://github.com/lspcontainers/lspcontainers.nvim/blob/main/lua/lspcontainers/init.lua

I have not tested others but pylsp works in kate.

Also im not sure but i would suggest that anyone trying to do this, make sure you mount your project folder inside the container where it is on your host.
or you could do like what i did by just mounting your home directory to the container.