Based on this Docker article.
Run this script to generate signed server and client keys to create a secure connection to the Docker daemon running on your server.
Usage: secure_expose_docker.sh [host] [password]
The password isn't really important as you'll have direct access to the key files, but if you want you can keep track of it in case you want to use the generated keyfiles for something else in the future.
For host, use the domain of your server. You'll be connecting to this domain once the Docker daemon is set up.