I hope this helps you . Further to our comments exchange, you will need to do some debugging - try this, then write what you see in comments below. I will update this answer once I have seen your comment.
hop of those help? Please see description of the issue in github.com/docker-library/php/issues/832 Tldr; debian uses ancient 2.5y old curl package while other platforms are using newer versions. There must be a bug that's causing this.