I was trying to install nginx in my centos

this is my Dockerfile.

FROM centos

COPY conf/nginx.repo /etc/yum.repos.d/nginx.repo
RUN yum install nginx

and this is my nginx.repo file

name=nginx repo

and I am getting this error while building this image

Please help me!

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:

my host operating system is centos 7 in a VM box , I am using it to learn docker, and I have not installed ca-certificates. how do we install ca-certificates?

So your host is Centos not just the Docker image. Well, it looks like ca-certificates does not exist on centos. I don’t use centos so I am not sure what the alternative is if it is required at all. You still haven’t replied my other questions.

NO, i am not behind the company network. i have simply a windows operating system . in that I have installed oracle virtual box . and created a centos virtual machine.