See:
https://docs.janusgraph.org/index-backend/elasticsearch/#rest-client-basic-http-authentication
https://docs.janusgraph.org/operations/container/#docker-environment-variables
Combine these two documentation sections and create environment variables like:
janusgraph.index.search.elasticsearch.http.auth.type=basic