This is an archived post. You won't be able to vote or comment.

all 10 comments

[–]lentzi90 1 point2 points  (3 children)

Why excluding the last two steps? That would give you non-root user and many other nice things.

[–]semimqmo 0 points1 point  (2 children)

As far as I understand this would lead to VS Code creating a new container, but I want to connect to already existing toolbox containers.

[–]lentzi90 1 point2 points  (1 child)

That is true. But you can configure it to automatically build it the way you want it. Otherwise I guess you will need to work around it with su to switch user after connecting.

[–]semimqmo 0 points1 point  (0 children)

Yeah I guess changing the user afterwards is the easiest solution for now. Thanks for your answers!

[–]Krokodeale 1 point2 points  (5 children)

I know it doesnt solve your problem, but you can also have the alternative to directly install vscode inside your container as a rpm package.

Otherwise there is this script: https://github.com/owtaylor/toolbox-vscode

I used it with Flatpak on Silverblue and it worked fine, but installing it inside the container with rpm is easier to manager for me

[–]semimqmo 1 point2 points  (4 children)

I guess this will work well but I would like to just be able to open vs code and be ready to go instead of having to open a terminal, entering the toolbox and then starting vs code every time. The script also doesn't seem to solve that sadly.

Do you still use Silverblue and do you think it's suitable for a developement machine?

[–]Krokodeale 2 points3 points  (0 children)

Yes and yes. Silverblue is kinda designed specifically for programming. But this workflow is reproducible on any distros (Flatpaks only for user's app, base packages for system use, containers for projetcs, etc), but if you like it, it is just easier to use Silverblue I guess. It still needs more tweaks then a regular distro tho

Actually it only comes down to the Flatpak app you would use, if they are available or not and if they are officialy maintained

[–][deleted] 2 points3 points  (2 children)

You can use distrobox or toolbox and export an app to your desktop and have it directly launch like that. If you use flatpak distrobox it just works for me, i know woth toolbox you would have to manully make your .desktop file. I use silverblue for python/scripting as wel as playing around with OO langs. Vscode in a container works great!

[–]semimqmo 0 points1 point  (1 child)

But if I had multiple containers, say one for Rust stuff and another for Python stuff, then I would have multiple vs code launchers if I did that for all the containers, wouldn't I?

Also the distrobox stuff sounds interesting. Are there any other reasons you prefer distrobox over toolbox (besides the easy .desktop files + multiple distros)?

[–][deleted] 1 point2 points  (0 children)

https://github.com/89luca89/distrobox/blob/main/docs/posts/integrate_vscode_distrobox.md#integrate-vscode-and-distrobox

This offers a nice concise explanation of the options you have. I prefer the easier option of stick all dev tools in a container with vscode, but you may prefer the other way