The procedure is three-staged, first level image contains base debian image, on top of that dependencies are installed, and in the final layer, we install Matlab.
at build host, do:
sudo mkdir /mnt/iso/1
sudo mkdir /mnt/iso/2
sudo mount -o loop ./isos/R2016b_glnxa64_dvd1.iso /mnt/iso/1
sudo mount -o loop ./isos/R2016b_glnxa64_dvd2.iso /mnt/iso/2
sudo apptainer build debian-image.sif debian-image.def
Actually, sudo
is again needed, because X installation has some weird scripts which need real root, so fakeroot is not working...
sudo apptainer build ./debian-image-withX.sif ./debian-image-withX.def
sudo apptainer build --bind /mnt/iso/1:/mnt --bind /mnt/iso/2:/root/Downloads/MathWorks/R2016b/ ./Matlab-2016b_debian-jessie.sif ./debian-image-upper.def
sudo umount /mnt/iso/1
sudo umount /mnt/iso/2
As matlab is in %runscript
section, it's enough to execute directly the resulting Matlab-2016b_debian-jessie.sif
image.
Indeed installing apptainer is required.