Change the image via sandbox

You can change the image on the fly via the build flag –sandbox.

 singularity build --sandbox ./sandbox docker://ubuntu:18.04
 touch sandbox/etc/myetc.conf
 singularity build sandbox.sif ./sandbox