I wanted to compile cernroot on ubuntu with python3 bindings for ROOT (pyROOT).
This is what worked for me (Dockerfile)
Let’s go ahead and test it:
Build the docker:
mkdir pyROOT_docker
cd pyROOT_docker
wget https://gist.github.com/acidbourbon/48fdc0df540614c11238a9e6765be3ae/raw/cad9e530ac83b4fcab2323307146a5ef0ffeee49/Dockerfile
docker build -t pyROOT_docker .
Run the docker (with x11 support)
docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix \
--name pyROOT_docker -v $(pwd)/workdir:/workdir \
--rm -it --user $(id -u) pyROOT_docker /bin/bash
Test the installation inside the docker:
micha@5be8c924103b:/$ . /root-build/bin/thisroot.sh
micha@5be8c924103b:/$ python3
Python 3.6.8 (default, Jan 14 2019, 11:02:34)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
>>> ROOT.TBrowser()
<ROOT.TBrowser object ("Browser") at 0x35d8560>
>>>
... a TBrowser window opens ... win!