There are some specific tags for working TLS and you can also solve it by using docker context which could be good if you're working with multiple hosts and connection types.
This guide it's kinda long, but it will walk you through the entire process.