RUN npm run build takes forever

If you can try a Mac instance which is not arm, that would only prove that it could work on another machine and with Docker Desktop on Mac. Not that the problem was the emulation, but it would be still likely. Although then you would run nested virtual machine and I don’t know how that affect performance Hopefully it would be just a little slower but could finish. I also don’t know how nested virtualization should be enabled on EC2.