A couple of thoughts:
Per the product documentation, the Preview Mode Docker image is not designed for production for several reasons. There is a production setup offered by the Mattermost Community you might consider.
The issue you're having appears to be Docker-specific and not related to Mattermost. Please consider posting to Docker Community Forum.