docker build error in pip

I am building a small app in docker. While building the app I run docker build -t my-python-app . and get this error.

=> [3/5] COPY requirements.txt ./                                                                                 0.1s
=> ERROR [4/5] RUN pip install --no-cache-dir -r requirements.txt                                                 9.1s
------
> [4/5] RUN pip install --no-cache-dir -r requirements.txt:
1.297 WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1028)'))': /simple/ast/
1.840 WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1028)'))': /simple/ast/