How does your LSP pick up everything like imports if they only live in a docker container?
When you run a project in a container, you mount the projects directory into the container.
That is nothing my editor cares about. It does not even know it. It works on the files locally on the host os and that's it. The the files are executed somewhere inside a container is none of the editors business.