If your using the production docker image, you should be able to follow the instructions here: https://github.com/mattermost/mattermost-docker to setup TLS.
If your using the mattermost-preview image, it does not support TLS as it is only for preview.