Jetbrains Projector & Mounting NFS Drives

Now, I am aware this will come somewhere down the bottom of random feature requests, but, hear me out :slight_smile:

I was playing around with IntelliJ Projector last night and it works pretty well, I’ve got a pattern that I could mostly reuse across a wide range of projects. The biggest issue/annoyance is having to reconfigure IntelliJ every time.

So this time, I added the .jetbrains folder to Git as a LFS folder so that it wasn’t just committing absolutely gob fulls of data to the git repo itself. This works pretty well, the start up times are pretty quick and I’m happy with it, but I get the feeling over time that solution would probably become suboptimal.

So then I messed with NFS but found that docker/kubernetes unprivileged containers etc and failing to mount the NFS mount.

Now of course if this was self hosted I could just mount the NFS drive to the pods or whatever myself, but it does defeat my plans of paying you guys money to do it for me. So I wonder if it would be possible to add “NFS Mounts” to the Gitpod yaml, and then have them added to the podspec when the container tries to come up so that Gitpod users have the ability to persist arbitrary data outside of Git.

Or have I missed something obvious?


@loujaybee Is this something you can help with?

1 Like

Why not put something like this in your .gitpod.yml?

sudo mount -F nfs [-o mount-options] server:/directory /mount-point

Because the pods aren’t spun up with any elevated privileges and so you can’t mount anything in.

I did just 5 minutes ago get a ssh connection working though with sshfs so I’ve made a bit of progress using fuse.

You actually can mount some types but not under /workspace though (bind mount works).

1 Like

So then nfs with --bind should work?

Well I dunno what does work but:

sudo mount -t nfs -o vers=4 /tmp/test
mount: /tmp/test: permission denied.

Certainly doesn’t.

Here’s where I’m getting stuck, unfortunately, I don’t have a network drive to test mounting, but try running this with your credentials:

sudo mount -t nfs -o vers=4 -o bind /workspace/empty/temp/
mount: /workspace/empty/temp: special device does not exist.

Idk about NFS. I was able to make some mountpoints such as tmpfs and overlayfs but again, not from under /workspace. So this comment was based on that idea.

Have you tried this fuse driver too?

Heads up: I’ve created an issue on GitHub to track this, also. I’m starting some conversations internally, I can get back to you/this conversation a bit later when I have some more details/context. It’s certainly an interesting question…

Maybe there is a different way to approach this… because Docker and K8s deal with storage somewhat differently and there are tools which can present storage to the application as if it was an NFS service. For example Ceph uses a resource called Rook to create an “NFS gateway” to containers running on K8s: Ceph Docs

I am pretty sure intellij stores the credentials under ~/.config. You can do something like this:

mv ~/.config/ /workspace/config
ln -s /workspace/config ~/.config

On starting up the workspace again you can relink

ln -s /workspace/config ~/.config