For Redhat Servers use the following
### Download and save ssl cert to a file dockerhub.crt ###
# echo | openssl s_client -showcerts -servername registry-1.docker.io -connect registry-1.docker.io:443 2>/dev/null | \awk '/-----BEGIN CERTIFICATE-----/,/-----END CERTIFICATE-----/' > dockerhub.crt
the local TLS files should be kept in /etc/pki/ca-trust/source/anchors so copy the dockerhub.crt file to anchors
# cp dockerhub.crt /etc/pki/ca-trust/source/anchors
then use update command to update the same
# update-ca-trust extract
update-ca-trust extract tool merges all of this into the extracted output files under:
/etc/pki/ca-trust/extracted
restart your docker service .
Done