You need to share the entire elasticsearch.yml, it is not clear if you set it right.
You need to set network.host to 0.0.0.0, if you set it to localhost this means that you cannot access it from outside the container.
It is also not clear what you tried to access, did you use http or https ? You need to use https.
Keep in mind that port 9200 is not a web interface, is the API endpoint of Elasticsearch.