Execute the following commands to create and sign a certificate:
$ openssl genrsa -out ~/.docker/ca-key.pem 2048
.+++
..........................................................................................................+++
e is 65537 (0x10001)
$ openssl req -x509 -new -nodes -key ~/.docker/ca-key.pem \
-days 10000 -out ~/.docker/ca.pem -subj '/CN=docker-CA'
$ ls ~/.docker/
ca-key.pem ca.pem
$ sudo cp ~/.docker/ca.pem /etc/docker/ssl