Start Elasticsearch with preloaded index

Is there any way we can start the elasticsearch instance with a preloaded index data?
Just like we do in postgres: Creating a Docker image with a preloaded database | Coding with Coffee

I think that's a similar discussion as here: Want to use Elasticsearch as a base image