Pandaroot Development inside Docker Container¶
TL;DR¶
Onboarding is now faster than ever:
Run
rklasen/cvmfs
containerClone Pandaroot
Open Repo in VSCode
Switch to DevContainer
And voila, VSCode behaves as if it’s being run inside the container (because it is). You can immedidiately start to compile and run PandaRoot, no further packet installation needed.
Why?¶
Batteries Included (environment is ready out of the box)
Ships with recommended extensions
User can still add their favorite extensions
Less compile time (if pre-built external packages from GSI and FairRoot are used)
Consistent dev environment (host packages, updates or distro don’t interfere with container image)
How?¶
Most of the info is taken directly from the official docs.

Basically it goes like this:
VSCode builds or pulls docker image
VSCode runs and mounts definitions from
.devcontainer
fileVSCode attaches to container
VSCode installs VSCode Server inside container, and installs extensions from definitions file
VCSCode attaches to Server inside container
Detailed Steps¶
Run the cvmfs
container:
docker run rklasen/cvmfs
Clone PandaRoot somewhere and open the repo in VSCode.
Remote Containers¶
Install the extension “Remote Containers”:

Click the remote containers option in the lower left corner (the yellow arrow thingies):

Select “reopen in container”:

This can take up to five minutes the first time this is done. Don’t worry, it will be faster the next time. The icon in the lower left should have changed:

Make¶
Select the dev kit. Since we’re now in a purpose-built container, only one is available:

After hitting <ctrl>
+ <b>
for building, we’re given the choice to select CMake:

However, configuring fails the first time because CMake doesn’t yet know where to configure. We can help it by running the built manually once. Open the integrated terminal with <ctrl>
+ <shift>
+ <`>
, go to cd build
and cmake ../
:

Extensions¶
If you’re missing your favorite extension, you can install it in the container per userspace:

If you think an extension should be added to the default install, add it to the .devcontainer
file (and submit a MR of course).
And bask in glorious ROOTness:¶

Drawbacks¶
So SSH Access from Container¶
Your .ssh/*
isn’t mounted by default, so you can’t access the Gitlab (yet).