Build docker image with previously added self signed certificate

Using a docker installation on Windows 10.

I would like to build a docker image that adds a self signed certificate to it. The certificate is stored on the local Windows machine. So far I use:

COPY sslproxycert.crt /usr/local/share/ca-certificates/sslproxycert.crt RUN chmod 644 /usr/local/share/ca-certificates/sslproxycert.crt && update-ca-certificates

Which apparently adds the certificate to the container (Updating certificates in /etc/ssl/certs…d81d2b637b46f99f113c36d8ae81381cb86598 1 added, 0 removed;) However, when the next command in the dockerfile runs to add a library (run pip install pymysql) it still shows the error “self signed certificate in certificate chain”

Would appreciate some advice.