tool not found inside container

The tool is in the image, but the container's PATH does not include it at runtime

why

Software installed during the build is only on the PATH afterwards if the image sets it in its environment section. Singularity/Apptainer also inherits parts of the host environment by default, so a host PATH can shadow the container's own.

what to do

Confirm the tool runs directly (apptainer exec image.sif bwa). If that works but the workflow fails, the difference is environment, not the image: set the PATH inside the image's environment block, and run with --cleanenv to stop host variables leaking in.

container environment handling
This is one entry from BioErrors, a catalogue of bioinformatics error messages that point at the wrong thing. Every entry was traced to its real cause before it was written down.
If your error is not in it, paste it there and it gets traced and added.