I did a quick search in the interwebs for your error
‘EAI_AGAIN’, syscall: ‘getaddrinfo’, hostname: ‘gateway.rocket.chat’ }
I found this which is likely the issue (because is it a DNS lookup error). The Host system may have working DNS but that doesn’t mean the docker container does.
You can shell into the container and test from there as well - something like this:
docker exec -ti my_container sh