Change the workspace folder that code-server opens on start up #3101
-
I want to run multiple code-server containers on a VM and I want each one to open a different workspace folder. I want to specify the folder that code-server should open in the docker run command so that the folder used in each container is customisable. How do I do this? for example in VS Code, to open the current folder, I would run
I would never open my entire C drive in VS Code, I don't know anybody who does, but it seems to be what is expected in code-server |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi Simon, just responded on Slack, too. Feel free to respond on either if you have questions :) When running with Docker in particular, you can mount different local directories to the /home/coder folder which code-server would open by default :) Here's an example of the docker run command: https://github.com/cdr/code-server/blob/main/docs/install.md#docker You can also do a similar thing with our Helm chart if you want to run code-server in kubernetes: https://github.com/cdr/code-server/tree/main/ci/helm-chart |
Beta Was this translation helpful? Give feedback.
Hi Simon, just responded on Slack, too. Feel free to respond on either if you have questions :)
When running with Docker in particular, you can mount different local directories to the /home/coder folder which code-server would open by default :) Here's an example of the docker run command: https://github.com/cdr/code-server/blob/main/docs/install.md#docker
You can also do a similar thing with our Helm chart if you want to run code-server in kubernetes: https://github.com/cdr/code-server/tree/main/ci/helm-chart