Here you will get the basic idea how to use elasticsearch with laravel and docker.

laravel elasticsearch

What is Elasticsearch? Elasticsearch is an open-source, RESTful, distributed search and analytics engine built on Apache Lucene. Since the first version of Elasticsearch was released in 2010, it has quickly become the most popular search engine, and is commonly used for log analytics, full-text search, and operational intelligence use cases.

Source Code and Documentation

https://github.com/nahidulhasan/laravel-docker-elasticsearch