Use Alpine Linux as the base box and install CellProfiler to run headless. This will create a smaller image.