Set up

  1. Install Docker
  2. Pull the ROOT (rootproject/root:6.26.06-ubuntu22.04) docker image:
    docker pull rootproject/root:6.26.06-ubuntu22.04
    
  3. Run the docker image:
    docker run -p 9200:9200 --rm -d -it -v ~/host/dir:/container/dir --name TBrowser rootproject/root:6.26.06-ubuntu22.04 root -l --web=server:9200 /opt/root/tutorials/v7/browser.cxx
    
    • -p 9200:9200 maps the port 9200 of the host to the port 9200 of the container
    • --rm removes the container after it exits
    • -d runs the container in the background
    • -it runs the container in interactive mode
    • -v ~/host/dir:/container/dir mounts the host directory ~/host/dir to the container directory /container/dir
    • --name TBrowser names the container TBrowser
    • rootproject/root:latest is the docker image
    • root -l --web=server:9200 /opt/root/tutorials/v7/browser.cxx runs the ROOT TBrowser in the container
  4. Open a web browser and go to localhost:9200/win1 to see the TBrowser:

TBrowser screenshot

  1. To stop the container, run:
    docker stop TBrowser