I forgot to put
#!/bin/bash
at the top of the sh file, problem solved.
This can happen if you're trying to run an x86 built image on an arm64/aarch64 machine.
You'll need to rebuild the image using the corresponding architecture
Add this code
#!/usr/bin/env bash
at the top of your script file.