This is a docker config for this tutorial: https://www.jeremydaly.com/access-aws-vpc-based-elasticsearch-cluster-locally/
Connect to your AWS elasticsearch domain from outside the VPC, protected by the ec2 PEM key. You can connect to the tunnel from your host and from all docker containers in your docker-compose network.