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
8.42k stars 305 forks source link

Default workspace directory is not mounted in AWS provider #1105

Open scottwn opened 4 weeks ago

scottwn commented 4 weeks ago

What happened?
I created a workspace using a local directory and the AWS provider. It appears that the directory is not mounted. I created a file in the devcontainer, but that file was not present in my local directory. I created another file in the local directory, but that file was not present in the devcontainer.

What did you expect to happen instead?
I expect the local workspace directory to be mounted in the devcontainer, so that changes in the devcontainer are reflected in the local FS. I'm new to devcontainers, so I could be wrong here, but I believe that is meant to be the default behavior.

How can we reproduce the bug? (as minimally and precisely as possible)
Create a workspace using the AWS provider and a local workspace directory. Create a file in the devcontainer called hello_world.txt. Note that that file is not present in the local workspace directory.

My devcontainer.json:

// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/cpp
{
    "name": "Aliro Yuma-SIL devcontainer",
  "image": "quay.io/aliro-technologies/aliro-orchestrator-yuma-devcontainer",

  // netconfd tends to leave this lock file lying around, which will foul up second and subsequent server starts.
  "postStartCommand": {
    "start-ssh":"/etc/init.d/ssh restart",
    "clear-lock":"rm -f /tmp/ncxserver.sock"
  }
}

Local Environment:

DevPod Provider:

Anything else we need to know?
related issues https://github.com/loft-sh/devpod/issues/947 https://github.com/loft-sh/devpod/issues/1072

pascalbreuninger commented 3 weeks ago

@scottwn I see, thanks for clarifying. That's actually intended behaviour at the moment. Local source are mostly to get you started or work with a local provider like docker. Once you move your workspace into a VM, DevPod syncs the files between your VM and it's devcontainer but not back to your machine.

We are exploring ways of syncing the files back to your local machine but it's not a priority at the moment.