loft-sh / devpod

Codespaces but open-source, client-only and unopinionated: Works with any IDE and lets you use any cloud, kubernetes or just localhost docker.
https://devpod.sh
Mozilla Public License 2.0
9.42k stars 342 forks source link

workspaceFolder specifies where the mount is #1362

Open shyim opened 3 days ago

shyim commented 3 days ago

What happened?
My docker image brings the most stuff; I just want to mount the code to a sub-directory. Therefore I have a script running in entry point which symlinks the folder /workspaces/<name> to /var/www/html/custom/plugins

I specify the workspaceFolder to /var/www/html, so the editor starts in the right folder (what works in GitHub Codespaces), but Devpod mounts my source code to /var/www/html and everything from the image is gone

What did you expect to happen instead?

Do the same as Codespaces / VSCode Official Plugin, clone always to /workspaces/<name> and use workspaceFolder just as editor startpoint

How can we reproduce the bug? (as minimally and precisely as possible)
Use my devcontainer.json there

My devcontainer.json: https://github.com/FriendsOfShopware/FroshTools/blob/main/.devcontainer.json

Local Environment:

DevPod Provider:

pascalbreuninger commented 3 days ago

Hey @shyim, thanks for reporting this issue. You're right, we need to change that in DevPod. Until then, could you try to set workspaceFolder to /var/www/html and workspaceMount to source=${localWorkspaceFolder},target=/workspaces/${devcontainerId},type=bind?