Setup JetBrains Rider in a Container

I’ve been playing around with Fedora Silverblue for a while now. I find the concept of immutable distributions extremely interesting, even if it still has a few problems. As soon as you deal with immutable distributions, you can’t get around Toolbox or Distrobox, whereby Distrobox is clearly ahead in my opinion.

The distrobox documentation describes the project with:

Use any Linux distribution inside your terminal. Enable both backward and forward compatibility with software and freedom to use whatever distribution you’re more comfortable with. Distrobox uses podman, docker or lilipod to create containers using the Linux distribution of your choice. The created container will be tightly integrated with the host, allowing sharing of the HOME directory of the user, external storage, external USB devices and graphical apps (X11/Wayland), and audio.

Here is a short guide on how to create an isolated development environment for .NET 8.0 within a few minutes, including the latest JetBrains Rider 2023.3.

The development container runs with the current Debian 12 image. As host environment I use Fedora 38 or Fedora 39 Silverblue. Of course, any distribution supported by Distrobox can be used.

Create the Development Container

In a first step, we create the container for the .NET development environment with the help of distrobox create.

distrobox create -i debian -n debian --home ~/.distrobox/debian

With distrobox enter we now “jump” into the container so that all further instructions are executed in the container.

distrobox enter debian

Setup .NET 8.0

The installation of .NET 8.0 under Debian is simple. You only need the official package repositories.

wget -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb

The entire .NET 8.0 SDK can now be easily installed with apt.

sudo apt update && sudo apt install dotnet-sdk-8.0

The necessary steps are explained in detail in the official Microsoft documentation.

Install JetBrains Rider 2023.3

For Rider to run smoothly, we need a few more libraries and of course git.

sudo apt install git libxtst6 libglib2.0-bin

Finally, all you need to do is download and unzip Rider.

tar xfvz JetBrains.Rider-2023.3.tar.gz

And you’re ready to start .NET development in a completely isolated environment 🍺

cd 'JetBrains\ Rider-2023.3/bin'