Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DevPod Kubernetes provider not handling bind mounts correctly #947

Closed
nesta219 opened this issue Mar 6, 2024 · 4 comments
Closed

DevPod Kubernetes provider not handling bind mounts correctly #947

nesta219 opened this issue Mar 6, 2024 · 4 comments

Comments

@nesta219
Copy link

nesta219 commented Mar 6, 2024

What happened?
I wanted to use devcontainer mounts to mount a pip.conf file to my DevPod container in order to pull private python dependencies. When I looked at the file on my DevPod's filesystem though, the pip.conf file was not a file, it was an empty directory.

What did you expect to happen instead?
I expected the pip.conf file to be created in the target location

How can we reproduce the bug? (as minimally and precisely as possible)

My devcontainer.json:

{
   ...
  "mounts": [
    {
      "source": "/opt/homebrew/etc/pip.conf",
      "target": "/tmp/pip.conf",
      "type": "bind"
    }
  ],
  ...
}

Local Environment:

  • DevPod Version: v0.5.4
  • Operating System: mac
  • ARCH of the OS: ARM64

DevPod Provider:

  • Cloud Provider: aws EKS
  • Kubernetes Provider: v1.28.4
  • Local/remote provider: ssh

Anything else we need to know?

@pascalbreuninger
Copy link
Member

Hey @nesta219,
I've been investigating this for a bit and haven't found a (quick) reliable solution for the kubernetes provider. The problem is that an empty volume mount will be usually (depends on the container runtime) created as a directory in the container.

There are ways around this but none of the ones I'm aware of are easy.
I'd keep this ticket open for now and see how many other people face this problem.

@scottwn
Copy link

scottwn commented May 31, 2024

I've noticed the same using the AWS provider. The workspace directory is not mounted to the container. Should I open a separate issue for the AWS provider mounts?

@pascalbreuninger
Copy link
Member

@scottwn This issue is about single file mounts not working on kubernetes, what you're describing sounds like a different problem to me.
Would be great if you could open a separate issue for it 👍

@bkneis
Copy link
Contributor

bkneis commented Oct 15, 2024

@nesta219 could you create a directory such as a etc in your home directory, then create a symlink to the pip.conf file and mount this directory instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants