Did you generate/create a certificate?? If not then you will have to first create a self-signed certificate and then add it to docker. Also, you can use any IP(it can be the host IP just change the last digit). Please find the below link for the steps to generate a certificate and setup tls security for docker.
$ sudo mkdir -p /etc/docker/ssl
$ mkdir -p ~/.docker
$ openssl genrsa -out ~/.docker/serverkey.pem 2048
$ openssl req -new -x509 -days 365 \
-key serverkey.pem \
-sha256 \
-out server.crt