Do you have any plugins in your app.yml besides the default (Discourse Docker Manager)? The vast majority of times I’ve had errors on rebuild it’s due to plugin incompatibility. So in that case can try rebuilding with everything except the default commented out (add # to the beginning of each line) in your app.yml. Then add them back one at a time to find the incompatible one.
Also, try running ./discourse doctor
it should restart your previously working container so your forum can be live again while figuring this out.
Info: Announcing Discourse Doctor