The real problem is this one:
If the server/container can’t access the Discourse source code in GitHub it won’t be able to build/update.
Since you said it works on the host, you need to debug the container networking. Drop to a similar container shell with docker run --it debian:buster-slim bash
and debug from there.