This is the last step of the build procedure. Maybe try removing or commenting out the last line of the Dockerfile (within your current directory), run the build process again (same command). When the build process is done, try installing ngspice within the container, and if its successful commit the container back to the original image.
If you are still getting the issue within the container, maybe try consulting bug reports online abut ngspice + mac