Avoid big image many packages build stopped at dockerhub

I have a big image based on Debian testing with several packages and libraries. The issue is that I can build ok in my laptop but always get “build canceled” when publishing to registry (Docker Hub)

is there any way of avoiding such error (not splitting the image in smaller ones) ?

thx