Binding Gitea to local host for SSH tunnel

Installed Gitea in docker. How can I make Gitea accessible only through an SSH tunnel?

I saw this post git - Binding gitea to the localhost address for tunneling? - Stack Overflow

However, the proposed workaround with HTTP_ADDR does not seem to work.