Developing with Flatpak's Visual Studio Code: Node, Docker Issues

I’m really enjoying my initial experience with CL. One hurdle I’m having a hard time overcoming is setting up my development environment with Flatpak’s sandboxing and VS Code. The Flatpak sandbox makes certain actions, like accessing host binaries, difficult. Some SDK’s like Go/Dotnet provide extensions which somewhat fix the issue, but other language packs like Node fall short. I’m wondering if other users in the community use the Flatpak version of VS Code, and, if so, how do you access docker tooling and deal with the sandbox?

In short, you’re hitting a use-case where FlatPak is not ideal for your needs. @ahkok has a post here that I think is worth reading:

@daviessd shared some tips about how they got FlatPak vscode working for dart-sdk

With --filesystem=home option, the flatpak will have access to files under your home directory. So one solution is to install packages in your home directory. I had built node before and it’s not hard at all.

More references is available here:
http://docs.flatpak.org/en/latest/sandbox-permissions.html

Well, but there are also scenarios that installing packages under home directory is not feasible or not convenient, but since flatpak explicitly blacklisted the access to most system directories, you’d better use other IDE.

There’s also a Snap for Visual Studio :

https://snapcraft.io/vscode

Thanks everyone. Would using rpm2cpio be an alternative to installing visual studio code if I opted not to use the Snap route?

rpm2cpio works fine, and it’d be better if you install it to /usr/local instead of /usr

1 Like

For manually installing vscode, check out some of the scripts and tips other community members have posted here https://community.clearlinux.org/t/need-native-support-for-vs-code-through-swupd/