1

I am in the following situation. I have a docker image with a file-system which is, starting from the root, of this kind

bin
etc
...
home
  /myname
     /MyProject
...
usr
...

and my local host is running an Ubuntu 20.04 distribution with its typical file-system of the form

bin
etc
...
home
  /myname
     /MyProject
...
usr
...

The folder MyProject is shared (i.e. if I change some file in that folder, I can see the change both locally and in the docker) and such a folder is tracked with git. Hence, the development process is to implement software changes locally and then build the overall project into the docker image. The project language is C (embedded).

I have a locally-installed LSP that sometimes reports some errors due to that there are some files that exist somewhere in the docker but I don't have locally (think for example to some header files that are located outside the folder MyProject on the container but on the host or to some other supporting file needed by the specific compiler version that is on the container but on the host).

What could be the best way to get the benefit of using a LSP in this kind of situation?

Barzi2001
  • 989
  • 8
  • 24
  • Where does Docker come into the picture? C is a compiled language and bind-mounting uncompiled source into a container isn't especially useful here; since you have to build the program on every change anyways, you can rebuild the image too. (Working principally outside Docker is probably faster since you get things like incremental builds.) – David Maze Feb 12 '22 at 22:20
  • 1
    Actually the whole toolchain is in the docker image. I change the source code locally and then build it into the container. The problem is that there are some header files in the container that are needed for the build and that I dont have locally. Hence, my (locally installed) LSP fails to find them. – Barzi2001 Feb 23 '22 at 15:19

0 Answers0