does lsp support mapping multiple source dirs to multiple destinations
korenhe opened this issue · 4 comments
by using .lsp-docker.yaml,
it is good for mapping only one source to one destinations like this :
mappings:
- source: "~/A"
destination: "A-in-docker"
myquestion is, is it possible to map multiple dirs, such as:
mappings:
- source: "~/A"
destination: "A-in-docker"
- source: "~/B"
destination: "B-in-docker"
my simple test result failed to start the docker container error, though i can copy B into A so I can mount one folder, but i think mount multiple folders may be easier to use.
Right now it is not possible to map multiple source dirs.
Can be implemented as an additional feature though. I'll take a look when I have enough time
@korenhe , just rechecked the feature: it looks like it is already implemented.
Are both of your source dirs inside a single project root (current implementation allows you to map only project root child folders)?
@factyy , my use case is in the host, the two folders are not in one root project, I need the mapping volumes to map those two folders to one root project in the docker.
If the host folders are already in same root project, It seems not necessary to map the subfolders, right? since they are already there.
@korenhe , the idea behind these limitations is simple: to avoid security risks (e.g. you are running "rootful" Docker with a root user inside the container) and accidentally map a sensitive root-owned directory on the host (e.g. /etc
) into the container. Than you can modify this directory from inside the container.
So right now any mapping is checked against the project root. You may not map the project root dir itself but a few separate folders down the directory tree.