Docker provides a fully self-contained FairShip environment that is independent of the host operating system. It is particularly useful when you need a reproducible, stateless snapshot for debugging a specific problem, when submitting jobs to an HTCondor or other cluster system that requires a container image, or when you want a strict boundary between FairShip’s software stack and your local machine. For day-to-day interactive development, the pixi workflow or CVMFS-based setup are faster and more ergonomic choices.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ShipSoft/FairShip/llms.txt
Use this file to discover all available pages before exploring further.
Image Sources
FairShip images are based onolantwin/ship-base:220713, a minimal image maintained at github.com/olantwin/ship-base that provides the full aliBuild software stack. Pre-built FairShip images are available on Docker Hub at hub.docker.com/r/olantwin/fairship if you want to skip the local build entirely.
Building the Image
Clone the repository
The
Dockerfile is included in the FairShip repository. Clone it to get both the build recipe and the source code that will be compiled into the image:Build the Docker image
Run The build copies the FairShip source into the image and compiles it with
docker build from the repository root. The -t fairship flag gives the image a convenient local name:aliBuild, which can take a significant amount of time on the first run. Subsequent builds reuse Docker layer cache where possible.Running the Container
- Basic interactive shell
- With X11 forwarding and volume mount
- HTCondor / batch use
Start a shell inside the container. The The container entrypoint (
--rm flag removes the container when you exit, keeping your Docker state clean:alienv enter --shellrc FairShip/latest) sets up the FairShip environment before dropping you into the shell. From there you can run simulations, reconstructions, and analyses exactly as you would in a native environment.Dockerfile Reference
TheDockerfile at the repository root is intentionally minimal:
- Base image
olantwin/ship-base:220713supplies the full aliBuild stack (ROOT, Geant4, FairRoot, etc.) so FairShip itself is the only package built from source. --no-local ROOTtells aliBuild to use the ROOT already present in the base image rather than rebuilding it.- The ENTRYPOINT requires
-t(allocate a pseudo-TTY) becausealienv enterchecks for an interactive terminal. Omitting-tcauses the entrypoint to hang or fail.
If you need to build the image with a modified FairShip source, make your changes locally before running
docker build. The COPY . /FairShip instruction copies the entire working tree, so uncommitted local changes are included in the image.