I was trying to install nginx in my centos

What is your host operating system? Are you behind a VPN, proxy or in a company network? If you installed ca-certificates and you still get this error the reason could be something in your network. It is not about the centos repo, but the Docker Hub, so the ini file is not relevant here.

I reformatted your post, please, use code blocks for sharing code as described in the below topic: