Keycloack Docker image does not resolve dns or can't verify identity of the server

After setting up the email settings in a keycloack docker instance i noticed that the docker image is unable to resolve dns names for ex: keycloak.org, or fails to validate ssl settings for certain ips.
Any ideas on how i could solve this?